Re: Should I close a connection when using DataBase Pool?



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
.



Relevant Pages

  • Re: When does IsReusable Property get interrogated?
    ... a transaction handler is released to the pool. ... class, which opens a DB connection, and provides the Databroker to its ... I haven't found the documentation to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Should I close a connection when using DataBase Pool?
    ... you should refer to the documentation of your pool library to be sure. ... Some pool managers (proxool for example) will automatically clean up connection resources such as statements and result sets. ...
    (comp.lang.java.programmer)
  • Re: Cannot Get Anonymous Access to Work
    ... I tend to think that when one alters group membership or login type ... The nice thing would have been if IIS6 documentation specified the ... least I see the intent to associate an application to an application pool, ... Leave Auth Users when running IIS? ...
    (microsoft.public.inetserver.iis.security)
  • Re: Windows time question.
    ... I would have hoped that the pool folk kept their documentation up-to-date, ... I don't know how the "pool" functionality in ntpd works, ... in question still assumes that pool.ntp.org returns random servers from ...
    (comp.protocols.time.ntp)
  • Info needed on seting up/installing Gold Crown pool table
    ... I was wondering if there are any web sites or documentation around for ... setting up a Brunswick Gold Crown 1 pool table. ...
    (rec.sport.billiard)