This content has been marked as final.
Show 1 reply
-
1. Re: Posting data to jms queue
rizzumd Jun 22, 2009 10:21 PM (in response to rizzumd)Hi,
I have configued for queue using components.xml as described in chapter 17(Asynchronous and Messaging)
In components.xml i have added:
<jms:managed-queue-sender name="paymentQueueSender" auto-create="true" queue-jndi-name="queue/paymentQueue"/>
In class for publishing data I am using the following class:
@In
private QueueSender paymentQueueSender;
@In
private QueueSession queueSession;
public void publish(Payment payment) {
try
{
paymentQueueSender.send( queueSession.createObjectMessage(payment) );
}
catch (Exception ex)
{
throw new RuntimeException(ex);
}
}
But In debugging I am getting both paymentQueueSender and queueSession as NULL. I verified queue with that JNDI name is existing. Can you tell me what else has gone wrong? Do I need to configure any other xml file apart from components.xml?