activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: How to enlarge ActiveMQ'S capacity of concurrent?
Date Thu, 05 Jul 2007 13:42:51 GMT
On 7/5/07, Elber <shaheer@hotmail.fr> wrote:
>
> I wrote this code and I want to know how can I modify it to share a
> connection between many threads:
>
> QConnection = queueConnectionFactory.createQueueConnection();
>

create the following vairables as instance variables within your
Runnable/Thread?

> QSession        = queueConnection.createQueueSession(false,
> Session.AUTO_ACKNOWLEDGE);
>
> QReceiver       = queueSession.createReceiver(Q);
>
> QConnection.start();
>
> SThread = new Thread(this);
>
> SThread.start();


-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message