Are you sure you are returning a connection to the pool after you are finished with it? There nust be a method to free a connection. F you don't relese the connection the pool tries to open a new one.
-----Original Message-----
From: Hunter Hillegas [SMTP:[EMAIL PROTECTED]]
Sent: Friday, December 17, 1999 7:53 AM
To: [EMAIL PROTECTED]
Subject: ConnectionPool
Hi!
I'm using the ConnectionPool example from Jason Hunter's book with my
servlets and a mySQL database on Linux...
Whenever a query hits the database, it's creating a new connection (it's
never reusing a connection from the pool)...
I don't really know the best way to troubleshoot this...
The first thing I tried was changing the setup on the ConnectionPool class
to perform a simple query I know is valid to perform the check on the
Connection object...
mySQL doesn't support transactions so I didn't know if
con.setAutoCommit(true) would throw an exception (and thus create a new
connection) or not...
It's still creating a new connection every time so I end up with a VERY
large pool that maxes out the DB...
Any suggestions?
Hunter
___________________________________________________________________________
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
