Hi,
I have recieved messages on my tomcat application.Following is the code
Properties props = new Properties();
|
props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| props.setProperty("java.naming.factory.url.pkgs",
"org.jboss.naming");
| props.setProperty("java.naming.provider.url",
"jnp://localhost:1099");
|
| Context context = new InitialContext(props);
|
| TopicConnectionFactory tcf = (TopicConnectionFactory)
context.lookup("TopicConnectionFactory");;
| conn = tcf.createTopicConnection();
| topic = (Topic) context.lookup("topic/testTopic");
|
| session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
| conn.start();
|
| TopicSubscriber recv = session.createSubscriber(topic);
| recv.setMessageListener(this);
For listening messages i have placed the following jars in commom/lib
jbossall-client.jar and jnp-client.jar.
My application is able to recieve messages from Jboss JMS.
Hope this helps you.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129552#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...