Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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: 36875
481
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!