commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Van Der Merwe <>
Subject [POOL] Exposing resources in a pool
Date Tue, 17 Jun 2003 08:21:01 GMT
Hi All,

The standard tomcat datasource resource is a pooled datasource.
In addition to all the datasource properties already exposed through admin
interface I also need to expose the pool behind the datasource.

I need to obtain a list of objects in the resource pool as well as
information on the thread that has each object checked out. With possibly
the ability to manually reclaim a resource.

Will this level of pool manageability be part of the standard tomcat
management feature set or will I have to do it myself?

One possible solution woudl be to extend the GenericObjectPool class in the
following manner: 

a. Add a secondary datastructure to keep track of who 'borrowed' 
b. Override the  borrowObject() & returnObject() methods to maintain 
   the secondary datastrucure 
c. Expose this class through an MBean.

This solution however would require building custom object factories and
getting hold of my datasource in a non standard way.

Any suggestions?

View raw message