You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Krishnakumar Parasuram <pa...@oracle.com> on 2016/01/28 08:43:40 UTC

Maintain sub pools within Commons pool - is it possible

Hi 

 

We are using Apache commons pool 2.2 for pooling connection object to connect between our REST framework to Siebel Server.

 

Everything works fine for what I have implemented.  But I want to enhance this framework.  The existing implementation maintains the connection object for a particular group called ObjectManger1.  Now I want to maintain the connection for multiple groups like ObjectManager1, ObjectManager2 . and so on.  Is it possible to implement this kind using commons pool.  

 

I want a subpool to be maintained for each ObjectManager_x  within the commons pool

 

Thanks and Regards

Krishnakumar

Re: Maintain sub pools within Commons pool - is it possible

Posted by Phil Steitz <ph...@gmail.com>.
On 1/28/16 12:43 AM, Krishnakumar Parasuram wrote:
> Hi 
>
>  
>
> We are using Apache commons pool 2.2 for pooling connection object to connect between our REST framework to Siebel Server.
>
>  
>
> Everything works fine for what I have implemented.  But I want to enhance this framework.  The existing implementation maintains the connection object for a particular group called ObjectManger1.  Now I want to maintain the connection for multiple groups like ObjectManager1, ObjectManager2 . and so on.  Is it possible to implement this kind using commons pool.  
>
>  
>
> I want a subpool to be maintained for each ObjectManager_x  within the commons pool

You might be able to accomplish your goals using a KeyedObjectPool. 
See the javadoc for that class.

Phil
>
>  
>
> Thanks and Regards
>
> Krishnakumar
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Maintain sub pools within Commons pool - is it possible

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Thu, Jan 28, 2016 at 8:43 AM, Krishnakumar Parasuram
<pa...@oracle.com> wrote:

> We are using Apache commons pool 2.2 for pooling connection object to connect between our REST framework to Siebel Server.
>
>
>
> Everything works fine for what I have implemented.  But I want to enhance this framework.  The existing implementation maintains the connection object for a particular group called ObjectManger1.  Now I want to maintain the connection for multiple groups like ObjectManager1, ObjectManager2 . and so on.  Is it possible to implement this kind using commons pool.
>
>
>
> I want a subpool to be maintained for each ObjectManager_x  within the commons pool

Could you please explain, what you have in mind technically? What
would be the difference between two separate pools, and
parent/subpool?

Thanks,

Jochen



-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


RE: FW: Maintain sub pools within Commons pool - is it possible

Posted by Krishnakumar Parasuram <pa...@oracle.com>.
Hi Jochen,

Thanks for your message.  The difference between to two separate pools is that in our framework we don't know exactly how many no of separate pool we might require, it is not two, but can scale more than 10, 20 in production environment and I think to have so many pools and that to we have to create dynamically at runtime, not practical

If it was a sub pool, I can always create the sub pool based on demand at runtime.  Moreover we have few parameters for each sub pool to maintain a min and max connection objects, which parameters can be different for each sub pool and cannot be implemented while design as we do not know these value of these parameters at design time.

Please let me know if this answers your question else let know

Regards
Krishnakumar

-----Original Message-----
From: Krishnakumar Parasuram 
Sent: Thursday, January 28, 2016 8:28 PM
To: Phil Steitz; dev@commons.apache.org
Subject: RE: FW: Maintain sub pools within Commons pool - is it possible

Hi Phil,

Thanks for your message.  First , how do I respond to your message. I have added the dev@commons.apache.org in this mail.

I am already using the keyedObjectPool, but the keyedObjectPool give me only one level of grouping i.e if the Key->A then I can group all the connection for A, but I need two levels of grouping i.e.

The ObjectManger1 will contain the connection for A,B,C... so with the existing implementation if I query for the Key->A then I will get the connection under ObjectManager1->A connection,

But my requirement is I want to have groups like ObjectManager1 with A,B,C ...  and
                                                                                          ObjectManaer2 with A,B,C ...
                                                                                          ObjectManager3 with A,B,C and so on

So when I request for a connection for A, I have the option to choose the A from ObjectManager1, ObjectManager2, or ObjectManager3 by selecting ObjectManagerX.

Is this kind of implementation possible?

Regards
Krishnakumar

-----Original Message-----
From: Phil Steitz [mailto:phil.steitz@gmail.com]
Sent: Thursday, January 28, 2016 7:10 PM
To: Krishnakumar Parasuram
Subject: Re: FW: Maintain sub pools within Commons pool - is it possible

Hi Krishnakumar,

I just moderated through and responded to this message on dev@commons.apache.org.

Please subscribe to the list so that you can see the responses and so that your posts do not require moderation.  Also, your question, while welcome, really belongs on the user list - user@commons.apache.org

Welcome to Commons!

Phil

On 1/28/16 12:45 AM, Krishnakumar Parasuram wrote:
>
>  
>
>  
>
> *From:* Krishnakumar Parasuram
> *Sent:* Thursday, January 28, 2016 1:14 PM
> *To:* dev@commons.apache.org; dev-help@commons.apache.org
> *Subject:* Maintain sub pools within Commons pool - is it possible
>
>  
>
> Hi
>
>  
>
> We are using Apache commons pool 2.2 for pooling connection object to 
> connect between our REST framework to Siebel Server.
>
>  
>
> Everything works fine for what I have implemented.  But I want to 
> enhance this framework.  The existing implementation maintains the 
> connection object for a particular group called ObjectManger1.
> Now I want to maintain the connection for multiple groups like 
> ObjectManager1, ObjectManager2 . and so on.  Is it possible to 
> implement this kind using commons pool.
>
>  
>
> I want a subpool to be maintained for each ObjectManager_x  within the 
> commons pool
>
>  
>
> Thanks and Regards
>
> Krishnakumar
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


RE: FW: Maintain sub pools within Commons pool - is it possible

Posted by Krishnakumar Parasuram <pa...@oracle.com>.
Hi Phil,

Thanks for your message.  First , how do I respond to your message. I have added the dev@commons.apache.org in this mail.

I am already using the keyedObjectPool, but the keyedObjectPool give me only one level of grouping i.e if the Key->A then I can group all the connection for A, but I need two levels of grouping i.e.

The ObjectManger1 will contain the connection for A,B,C... so with the existing implementation if I query for the Key->A then I will get the connection under ObjectManager1->A connection,

But my requirement is I want to have groups like ObjectManager1 with A,B,C ...  and
                                                                                          ObjectManaer2 with A,B,C ...
                                                                                          ObjectManager3 with A,B,C and so on

So when I request for a connection for A, I have the option to choose the A from ObjectManager1, ObjectManager2, or ObjectManager3 by selecting ObjectManagerX.

Is this kind of implementation possible?

Regards
Krishnakumar

-----Original Message-----
From: Phil Steitz [mailto:phil.steitz@gmail.com] 
Sent: Thursday, January 28, 2016 7:10 PM
To: Krishnakumar Parasuram
Subject: Re: FW: Maintain sub pools within Commons pool - is it possible

Hi Krishnakumar,

I just moderated through and responded to this message on dev@commons.apache.org.

Please subscribe to the list so that you can see the responses and so that your posts do not require moderation.  Also, your question, while welcome, really belongs on the user list - user@commons.apache.org

Welcome to Commons!

Phil

On 1/28/16 12:45 AM, Krishnakumar Parasuram wrote:
>
>  
>
>  
>
> *From:* Krishnakumar Parasuram
> *Sent:* Thursday, January 28, 2016 1:14 PM
> *To:* dev@commons.apache.org; dev-help@commons.apache.org
> *Subject:* Maintain sub pools within Commons pool - is it possible
>
>  
>
> Hi
>
>  
>
> We are using Apache commons pool 2.2 for pooling connection object to 
> connect between our REST framework to Siebel Server.
>
>  
>
> Everything works fine for what I have implemented.  But I want to 
> enhance this framework.  The existing implementation maintains the 
> connection object for a particular group called ObjectManger1.
> Now I want to maintain the connection for multiple groups like 
> ObjectManager1, ObjectManager2 . and so on.  Is it possible to 
> implement this kind using commons pool.
>
>  
>
> I want a subpool to be maintained for each ObjectManager_x  within the 
> commons pool
>
>  
>
> Thanks and Regards
>
> Krishnakumar
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org