On 10/25/07, Tony Fountain <[EMAIL PROTECTED]> 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 {
...do something...
} finally {
conn.close();
}
--
Len
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]