geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From easyl <easy....@gmail.com>
Subject Re: sudden NullPointerException from ActiveMQSessionExecutor.wakeup
Date Mon, 29 Mar 2010 12:27:49 GMT

hallo kevan,

what do you mean close() exactly?
I just use following send/reply pattern.

however the consumer (receiver) may do a long running tasks.
(consumers are slower than producer.)


 
> connection = factory.createQueueConnection();
> connection.start();
> 
> session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
> sender = session.createSender(requestQueue);
> 
> replyQueue = session.createTemporaryQueue();
> 
> jmsRequestMessage = session.createTextMessage();
> 
> sender.send(jmsRequestMessage, DeliveryMode.NON_PERSISTENT,
> Message.DEFAULT_PRIORITY, timeToLive);
> 
> receiver = session.createReceiver(replyQueue);
> jmsReplyMessage = receiver.receive();
> 
> connection.close();
> 
-- 
View this message in context: http://n3.nabble.com/sudden-NullPointerException-from-ActiveMQSessionExecutor-wakeup-tp676485p683291.html
Sent from the Users mailing list archive at Nabble.com.

Mime
View raw message