[
https://issues.apache.org/jira/browse/POOL-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506784
]
Phil Steitz commented on POOL-98:
---------------------------------
OK, I understand the use case, but with the 1.3 pool impl, I don't think what
you want can be done. Fortunately or unfortunately, GenericObjectPool is
actually an "idle object pool" + accounting - i.e, the object references that
it maintains persistently in its _pool linked list are only the *idle*
instances waiting to be checked out. It does not maintain references to the
checked out instances (only counts of these) so there is no way to "walk the
pool" of all idle plus active objects. To support this, you need something
like the (now deprecated) AbandonedObjectPool that was added to [dbcp] to keep
track of objects checked out of the pool. The compositepool package (at this
writing not yet released) also includes support for tracking objects borrowed
from the pool.
The reason that I don't like allowing subclasses to depend on _pool is that it
then becomes part of the public API, so can't be changed or deleted later.
> Make GenericObjectPool better extensible
> ----------------------------------------
>
> Key: POOL-98
> URL: https://issues.apache.org/jira/browse/POOL-98
> Project: Commons Pool
> Issue Type: Improvement
> Affects Versions: 1.3
> Reporter: Henning Schmiedehausen
> Priority: Minor
>
> The current implementation of GenericObjectPool encapsulates the _pool
> object and there is no way to get it directly, which makes some things
> like JMX pool monitoring a bit awkward.
> Would it be possible to either make _pool protected or add a method
> protected Collection getInternalPool() {
> return _pool;
> }
> or something like that to the GenericObjectPool implementation (and
> probably others, but that is the one that bites me most... :-) )
> This would make extending the GenericObjectPool much easier.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]