my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes commons dbcp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "commons dbcp" Watch "commons dbcp" New topic
Author

commons dbcp

O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

Hi All,

Is there a way i can ensure that when i call conn.close() the connectoin is actually closed and not just returned to the pool?
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19760
    
  10

If you got the connection from the pool then it's none of your business whether it gets closed. That's up to the pool. So, if you have a problem because you have too many open connections (I'm just guessing at your real problem here) then you should configure the pool to not keep so many open connections. Don't try to second-guess it.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63355
    
  70

"Ziggy O", you have previously been warned on one or more previous occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff
[ April 24, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: commons dbcp
 
jQuery in Action, 3rd edition