> 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....
I have a framework exactly as you described
above...<http://www.working-dogs.com/dash/>...
I don't have that problem because I make sure to close the database
connection in the finally statement of the service method...that is probably
your problem. I bet that you are doing development and throwing exceptions
which cause the close() method to not be called and thus you are running out
of connections to the database.
I hope that helps,
-jon
___________________________________________________________________________
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