This content has been marked as final. Show 1 reply
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