• Subject: Re: RMI server
  • From: "Luther Ananda Miller" <LAM_SoftTel@xxxxxxx>
  • Date: Thu, 8 Apr 1999 08:56:49 +0200

Ět sounds slightly related to a problem we just ran into.. we are now
implementing Stored procedures for returning results sets and have found
that when we call the stored procedures from the client and keep the results
open (in order to bind them to a grid, etc., and allow the user to have
multiple windows open on different restults) that get the same error
message. In the stored procedure we must hardcode a cursor name to use to
return the results set. It seems that if we call the stored procedure again
from the same connection before the resultset from the first call has been
closed (and hance the underlying cursor) we get this error message "Cursor
C1 already open" (we are using C1 for the cursor name in the stored
procedure). It seems that the program cannot differentiate the cursors it
uses in subsequent calls to itself in the same connection, so if a cursor
from a previous call is already open then it comes back with this error
message.

Perhaps your problem is the same - perhaps a temporary cursor name is being
generated for the parameter query results (by the Java code? by the AS/400
toolbox? by the JDBC driver?) and a previous call still has the cursor open
with the same name in the same DB connection.

Are you closing all the results when you are done with them? Is lazy close
enabled? How many connection are you using? etc etc.

Luther

LAM_SoftTel@usa.net -- http://www.lanandam.com
-----Original Message-----
From: Glenn Holmer <gholmer@weycogroup.com>
To: java400 <JAVA400-L@midrange.com>
Date: Wednesday, 7 April 1999 20:13
Subject: RMI server


>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                          gholmer@weycogroup.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:
david@midrange.com
>+---

+---
| 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: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.