• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache Commons GenericObjectPool

 
Siri Reddy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Siri
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic