This content has been marked as final. Show 2 replies
I am working on a sample MULE application for Messaging, using JBoss4.2.1 & JBossMQ. I came to know that the steps are:
Step 1: Obtain a queue connection factory. A queue connection factory is used to create the queue connection object used to handle the connection to the message servers queue.
Step 2: Create a queue connection. This is done by calling the createQueueConnection method on the factory object just obtained.
Step 3: Create a queue session. A queue session is obtained from the queue connection, as illustrated below:
QueueSession qs =
But I am not aware of where to define the ConnectionFactory so that I can obtain the ConnectionFactory.
The ConnectionFactory is available for you in the JNDI. You just have to lookup the same as follows:
Context iniCtx = new InitialContext(); QueueConnectionFactory qf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
Both the TopicConnectionFactory and the QueueConnectionFactory are available with the same jndi-name "ConnectionFactory".
For more details have a look at http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch6.chapt.html