I've got an RMI server running on one of our AS/400's (V4R2) that is probably not coded properly, and I'm wondering what the possible side effects of this might be. I am not multithreading client requests, although sensitive ones (like getting next available serial no. for a barcode) are marked "synchronized". We have had this RMI server in light production use for a couple of months, but last week used it heavily to bring the first 18,000 pairs of shoes into our new warehouse. All went well for about a day and a half, but then the server began to crash repeatedly with a message like "SQLCURSOR000000007 already open", received and displayed by the client. (Could this be some kind of resource issue on the '400?) I should note that I am using JDBC and prepared statements with com.ibm.db2.jdbc.app.DB2Driver. My question is this: if an RMI server method just returns a value (without creating another object that starts its own thread, etc.), what happens when multiple clients hit it? Do the second, third, etc. clients just wait? Does the RMI server itself spawn off any additional threads to handle this situation? Does it make any difference if the methods are marked "synchronized"? What if a client is somehow able to make a second request before the first has returned? If I do rewrite it to use multithreading, is there a limit to the number of threads that can be started? Any suggestions for improvement would be welcome, as RMI responds very quickly for us, although I am about to put a *serious* load on it as we bring the rest of a million pairs of shoes into the warehouse... I would be happy to attach the source code if anybody wants to see it. -- ____________________________________________________________ Glenn Holmer email@example.com Programmer/Analyst phone: 414.908.1809 Weyco Group, Inc. fax: 414.908.1601 +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: firstname.lastname@example.org +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.