File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "commons dbcp" Watch "commons dbcp" New topic

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

Joined: Oct 14, 2005
Posts: 19973

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

Joined: Jan 10, 2002
Posts: 63838

"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.

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

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: commons dbcp
It's not a secret anymore!