On 7/5/07, Elber <[EMAIL PROTECTED]> 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/
