tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Len Popp" <>
Subject Re: Suggestions for connection pooling
Date Thu, 25 Oct 2007 21:24:34 GMT
On 10/25/07, Tony Fountain <> wrote:
> Now, my goal is to utilize connection pooling.  Does (a) this
> implementation achieve that and (b) the close statement suffice to
> return the object to the pool and not actually close the connection?  Or
> do I also need to set "conn = null;"?

You don't need to set conn = null, but you *do* need to make sure that
the connection is closed in all cases, even when an exception is
thrown. So:

       Connection conn = ds.getConnection();
       try {
       } finally {


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message