Title: RE: ConnectionPool
You might try a different connection pool. If you're interested, you can obtain a REALLY kick-ass connection pool at the link below. It's very easy impliment into your present code( you literally just change two lines in your code) and it comes with a complete config file and servlet example.
 
 
 
John D. McDonald
CipherStream Systems
email: [EMAIL PROTECTED]
web: www.cipherstream.com
-------------------------------------------------------
Secure E-Business Is Our Business
-------------------------------------------------------
----- Original Message -----
Sent: Friday, December 17, 1999 8:11 AM
Subject: Re: ConnectionPool

I'm sure.
----- Original Message -----
Sent: Friday, December 17, 1999 1:22 AM
Subject: Re: ConnectionPool

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

Reply via email to