Paul:

I've had the exact same problem: if for some reason a connection doesn't get
closed by a servlet in an orderly fashion, the pool can end up growing when
you don't need/want it to. I've added some logic to our connection pool
object to handle a "timeout" on a connection - if it's idle for more than
some configurable number of seconds, return it to the pool for re-use. This
stops the problem from getting out of hand if a bug (gasp) slips into a
servlet!

If you'd like a copy of the connection pool we use, it's at
http://www.javacorporate.com, part of Expresso framework. Open source, so
help yourself.

Mike
Javacorporate Ltd


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Paul
Szynol
Sent: Friday, September 03, 1999 2:38 PM
To: [EMAIL PROTECTED]
Subject: connection pooling


i am writing a cluster of servlets, each of which access a database.  im
curious if people would recommend that each servlet have its own connection
pooling, or that all the servlets use the same connection pooling servlet,
or some other type of configuration?

i have gone with the latter, but i've found that once in a while connections
get orphaned -- they never close, and the connection pooling servlet
therefore creates a new connection for each subsequent request, which, when
repeated enough times, eventually exhausts resources.

putting together a connection pooling servlet for EACH servlet seems a
little redundant, but may be the way to go, for me, anyway, at least in
terms of trouble shooting.  but i'd love to hear some
advice/opinions/suggestions.  are there benefits to this approach?

thanks.

best,
paul

___________________________________________________________________________
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