tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abh N <viks4...@yahoo.co.in>
Subject RE: need inputs on connection pool
Date Wed, 05 Apr 2006 15:27:28 GMT
Thanks Marc.
   
  I was reading an article 
   
  http://java.sun.com/developer/technicalArticles/J2EE/pooling/
   
  it says with con.close() the connection will be released to connection pool in jdbc 2.0
, in 1.0 it will be closed with the stmt.
   
  
"Farrow, Marc" <MFarrow@sefl.com> wrote:
  It is always good practice to call the close methods on the Connection,
Statement, PreparedStatement, ResultSet objects (if you use them). Depending
on the connection pooling that you are using, they may or may not get
released in a timely manner (for example, timeouts/etc). By explicitly
calling the conn.close() method, you are telling the connection pooling
manager that you are finished with this connection and it can immediately
return the connection to the pool.



-----Original Message-----
From: Abh N [mailto:viks4tec@yahoo.co.in]
Sent: Wednesday, April 05, 2006 11:16 AM
To: users@tomcat.apache.org
Subject: need inputs on connection pool

Hi,

we are implementing the connection pooling in our application.

connections are taken from the data source.

After getting the connection i need to confirm whether i have to explictly
close the connection
like conn.close ()

i want to know in above case whether connection will be release to the pool
or will get closed.

i have a doubt as in above case the connection might be getting closed and
might not be available for re-use.




---------------------------------
Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



				
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message