[ 
https://issues.apache.org/jira/browse/POOL-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506780
 ] 

Henning Schmiedehausen commented on POOL-98:
--------------------------------------------

Well, giving it away through a protected getter is not really exposing it, just 
adding enough rope so that a custom Pool implementation can get access to the 
idle objects if it needs to.

Here is the use case:

In a project, we use  GenericObjectPool to manage connections to an EIS (big, 
old, clunky, Cobol thing). Each of these connection objects has a number of 
internal state that operations wants to be able to inspect (through JMX). 
Easiest would now be to get the pool list and expose some properties of these 
connection objects through an MBean.

The properties of the pool are exposed just fine, it is actually the pool 
contents that needs to be monitored.

Maybe second thoughts? :-)

> 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]

Reply via email to