You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by petera <pe...@egsgroup.com> on 2006/09/14 18:28:02 UTC

Connection pooling

Hi,

Is it  advisable to use connection pooling with ActiveMQ connections ? 

TIA Peter
-- 
View this message in context: http://www.nabble.com/Connection-pooling-tf2272704.html#a6309661
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Connection pooling

Posted by petera <pe...@egsgroup.com>.
James,

Thanks. I will definitely do this.

Peter


James.Strachan wrote:
> 
> On 9/15/06, petera <pe...@egsgroup.com> wrote:
>> James,
>>
>> I thought the session, producer and consumer objects were "lightweight"
>> objects
>> that take only a small amount of time to initialise ?
> 
> Session, producer and consumer are lightweight in the sense that they
> dont' create a socket like a Connection does but they all cause
> network chatter with the broker when they are created & closed - so
> should not really be created on demand but rather be polled and reused
> 
> http://incubator.apache.org/activemq/how-do-i-use-jms-efficiently.html
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Connection-pooling-tf2272704.html#a6321142
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Connection pooling

Posted by James Strachan <ja...@gmail.com>.
On 9/15/06, petera <pe...@egsgroup.com> wrote:
> James,
>
> I thought the session, producer and consumer objects were "lightweight"
> objects
> that take only a small amount of time to initialise ?

Session, producer and consumer are lightweight in the sense that they
dont' create a socket like a Connection does but they all cause
network chatter with the broker when they are created & closed - so
should not really be created on demand but rather be polled and reused

http://incubator.apache.org/activemq/how-do-i-use-jms-efficiently.html
-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Connection pooling

Posted by petera <pe...@egsgroup.com>.
James,

I thought the session, producer and consumer objects were "lightweight"
objects
that take only a small amount of time to initialise ?

Peter 


James.Strachan wrote:
> 
> FWIW there's no need to pool the ConnectionFactory and you only need a
> single Connection object (so I guess thats a kind of pooling, just a
> really simple pool :) but the session/producer/consumer objects should
> definitely be pooled.
> 
> On 9/14/06, javaxmlsoapdev <vi...@yahoo.com> wrote:
>>
>> Absolutely yes. you should use pooling for JMS factory, JMS connection,
>> consumers etc. These are expensive resources. look at Jencks for pooling.
>>
>> petera wrote:
>> >
>> > Hi,
>> >
>> > Is it  advisable to use connection pooling with ActiveMQ connections ?
>> >
>> > TIA Peter
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Connection-pooling-tf2272704.html#a6313305
>> Sent from the ActiveMQ - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Connection-pooling-tf2272704.html#a6320689
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Connection pooling

Posted by James Strachan <ja...@gmail.com>.
FWIW there's no need to pool the ConnectionFactory and you only need a
single Connection object (so I guess thats a kind of pooling, just a
really simple pool :) but the session/producer/consumer objects should
definitely be pooled.

On 9/14/06, javaxmlsoapdev <vi...@yahoo.com> wrote:
>
> Absolutely yes. you should use pooling for JMS factory, JMS connection,
> consumers etc. These are expensive resources. look at Jencks for pooling.
>
> petera wrote:
> >
> > Hi,
> >
> > Is it  advisable to use connection pooling with ActiveMQ connections ?
> >
> > TIA Peter
> >
>
> --
> View this message in context: http://www.nabble.com/Connection-pooling-tf2272704.html#a6313305
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Connection pooling

Posted by javaxmlsoapdev <vi...@yahoo.com>.
Absolutely yes. you should use pooling for JMS factory, JMS connection,
consumers etc. These are expensive resources. look at Jencks for pooling.

petera wrote:
> 
> Hi,
> 
> Is it  advisable to use connection pooling with ActiveMQ connections ? 
> 
> TIA Peter
> 

-- 
View this message in context: http://www.nabble.com/Connection-pooling-tf2272704.html#a6313305
Sent from the ActiveMQ - User forum at Nabble.com.