This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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: 61106
    
  66

"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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: commons dbcp