This content has been marked as final.
Show 1 reply
-
1. Re: Messaging with IBM Websphere MQ 7 JCA Adapter - Multiple
igor.beslic Aug 12, 2009 11:37 AM (in response to igor.beslic)Hi. I've solved this myself. Solution was easy:
There is no need to configure topic destination. Once connection factory is obtained use session object to create Topic.
Here is code:InitialContext ic = new InitialContext(); ConnectionFactory cf = (javax.jms.ConnectionFactory) ic.lookup("java:wmq/myFC"); Connection conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); Topic topic = sess.createTopic("CITY/NEWS/City_1"); MessageProducer mp = sess.createProducer(topic); mp.send(sess.createTextMessage("***This is topic message***" )); conn.close();//comment this if calling from MDB