Re: Should I close a connection when using DataBase Pool?
- From: Sebastian Millies <sPUNKTmillies@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Nov 2007 15:55:14 +0100
Am Thu, 08 Nov 2007 06:09:06 -0800 schrieb JTL.zheng:
database pool means that the conncetion can be used by other user.
so when I finish the job, should I call
conn.close();
after it as the old way?
Yes. However, you should refer to the documentation of
your pool library to be sure. E. g. it could be like this:
PooledConnection conn = Pool.getConnection();
....
conn.close()
where the implementation of PooledConnection#close()
may choose to return the connection to the pool.
-- Sebastian
.
- Follow-Ups:
- References:
- Should I close a connection when using DataBase Pool?
- From: JTL.zheng
- Should I close a connection when using DataBase Pool?
- Prev by Date: Re: random real number between 0 (inclusive) and 1 (inclusive)
- Next by Date: Re: servlet access to another context
- Previous by thread: Should I close a connection when using DataBase Pool?
- Next by thread: Re: Should I close a connection when using DataBase Pool?
- Index(es):
Relevant Pages
|