This content has been marked as final.
Show 2 replies
-
1. Re: JMS -JBoss -- where to define ConnectionFactory
hanumesh_m Dec 5, 2007 9:10 AM (in response to hanumesh_m)"hanumesh_m" wrote:
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 =
qc.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
But I am not aware of where to define the ConnectionFactory so that I can obtain the ConnectionFactory. -
2. Re: JMS -JBoss -- where to define ConnectionFactory
jaikiran Dec 5, 2007 9:30 AM (in response to hanumesh_m)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