File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Apache Commons GenericObjectPool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache Commons GenericObjectPool" Watch "Apache Commons GenericObjectPool" New topic

Apache Commons GenericObjectPool

Siri Reddy

Joined: Oct 20, 2006
Posts: 17
Hi All,
i am useing Apache Commons GenericObjectPool, in one case i want to flush all connections.
how to flush(Close) all connections.

Thanks in Advance.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Whats wrong with the close() method? As described in the Javadocs.

If the objects you are pooling require special handling when flushing/being discarded, I think you will have to program that yourself. From my cursory examination of the API, it looks like your implementation of PoolableObjectFactory can specify what happens to the discarded object in the destroyObject method.

I agree. Here's the link:
subject: Apache Commons GenericObjectPool
It's not a secret anymore!