See at <VR>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Vasudev Ram
Infosys Technologies Limited
Pune, India
Email : [EMAIL PROTECTED]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

> -----Original Message-----
> From: Hunter Hillegas [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 17, 1999 11:23 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...
>
<VR> Open a log file in each of your classes  (ConnectionPool,
YourServletApp)
and write messages to the log file to show the flow of control
and variable values.
</VR>

> 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...
>
        <VR> Write a test program to find out if setAutoCommit throws
        exceptions.
        </VR>

> 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

___________________________________________________________________________
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