On each database is possible allocate limited number of handles. For
example on DB2 over 100. Handle is allocation for example by calling
createStatement() or preparedStatement. You must therefore close statement
after the SQL is done.
Statement stm=con.createStatement();
stm.executeQuery(....)
stm.executeQuery(....)
stm.close(); // this line is very import

                                Milan

----------
Odesilatel:     David Snyder[SMTP:[EMAIL PROTECTED]]
Odpovidi:       A mailing list for discussion about Sun Microsystem's Java
Servlet API Technology.
Odeslano:       7. eervence 1999 21:20
Komu:   [EMAIL PROTECTED]
Poedmit:        No more handles

After several requests of my servlet, I get a 'No more handles' error.
CLI0129E.  SQLState=HY014.  My servlet calls five different classes
depending on
parameters that are passed in from html pages.
      The classes themselves, perform simple sql statements and data
manipulation.  The data is then formatted and sent to the browser.  The
first
version of the servlet created a single connection in the init section and
passed that connection object to the class objects in the service method.
 Later
versions of experimenting used connection pooling that passed the
connection
object to the class object in the service method.  Even with connection
pooling,
I still get a 'No more handles' error.
     Maybe I should create statement objects in the init section and pass
them
to the class objects instead of the connection obejct?  Does anyone have
any
suggestions or ideas on this subject.  My last resort will be to create a
new
connection every time the service method is called.  I really don't want to
do
this because it is expensive.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to