Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do we need to close the Connection while using Connection Pooling?

 
reddy sekhar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

i am quite new to connection pooling concept. i would like to know that, once we get the Connection from the connection pooling, after using the Connection, should we need to Close the Connection by calling Connectin.close(). Or Connection Pooling itself manages the same.

Thanks for your help in Advance.

- Chandra.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
 
reddy sekhar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for your reply Paul Sturrock.

You mean we need to close the Connection (Connection.close()) manually?


thanks
Reddy.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34371
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To elaborate - yes, calling close() is what tells the connection pool you are done using the connection and it can be given to another user.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic