Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: Urgent help, please!Best practices using Connection Pool

Nathan Christiansen

2003-10-08


DBCP wraps the connection object. When you call conn.close(); on the connection object given to you by the DataSource.getConnection(); method, it just releases it back into the pool, it dosen't actually close the connection.

-- Nathan Christiansen
 Tahitian Noni International
 http://www.tahitiannoni.com


-----Original Message-----
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:Jose.Euclides@(protected)]
Sent: Wednesday, October 08, 2003 5:19 PM
To: 'tomcat-user@(protected)'
Subject: Urgent help, please!Best practices using Connection Pool


Hi,
i am using DBCP 1.0. My question is simple: since DBCP doesnt create a
singleton object ( just a data source object), what should i do whenever my
sql queries are done? Should i close the connection after that? But, if i do
this, will i loose my connection pool facility, so my next connection time
will waste more time...
Thanks in advance,
Euclides.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.