Hi all,
I am facing problem in JMS configuration in
JBoss. I am using the default ConnectionFactory
java:/XAConnectionFactory.
My code looks like this:
Properties h = null;
try
{
h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
h.put(Context.PROVIDER_URL, "http://localhost:8010/invoker/JNDIFactory");
}
catch (Exception ne) {
System.out.println("Error in Service Controller=" + ne.toString());
}
InitialContext iniCtx = new InitialContext(h);
Object tmp = iniCtx.lookup("java:/XAConnectionFactory");
The above line is giving errors TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
conn = tcf.createTopicConnection("jduke", "theduke");
conn.setClientID("OtherSubscriptions");
topic = (Topic) iniCtx.lookup("topic/testTopic");
session = conn.createTopicSession(false,
TopicSession.AUTO_ACKNOWLEDGE);
conn.start();
what should I do to send and receive a message in JBoss?
thanks in advance
srinivas