I had this same problem using an Access database.  The problem turned out to
be that I was not explicitly closing ResultSet, and Statement objects, just
letting them be garbage collected.  This didn't release the database
resources, and I was quickly pegged-out at the 2048 handles allowed by
Access.  You however, say that the servlet works fine for a "brief period of
time", so this may or may not be the problem.  Check how many
requests/updates you are making to the database, and compare that number
with the maximum number of handles allowed.

Brian Howell

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of David
Snyder
Sent: Tuesday, July 06, 1999 1:21 PM
To: [EMAIL PROTECTED]
Subject: No more handles..


Servlet Description:

I have a servlet that receives parameters from a html page.  The parameter
determines the class that is to be called from the service method.  Each
class
performs certain JDBC functions and outputs the results to the browser.  A
single database connection is created in the init method of the servlet.
That
connection is then passed to the classes when they are called, so they can
perform their JDBC functions.

Problem Description:

The above servlet and its classes work fine for a brief period of time.
After
several requests are handled, the servlet starts to receive a DB2.Exception,
no
more handles.

Has anyone else come across anything like this before?  I am beginning to
think
that passing one single connection to the classes is the culprit??  Any
ideas....

___________________________________________________________________________
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