|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
An exception occured while creating the TopicConnection |
« View previous topic :: View next topic » |
Author |
Message
|
navjot |
Posted: Tue Jan 31, 2006 10:33 pm Post subject: An exception occured while creating the TopicConnection |
|
|
Newbie
Joined: 31 Jan 2006 Posts: 5
|
Working on test enviorment with Embedded MQ 5.3 and RAD6.0 and test server WAS5.1. Getting following exception-
Exception in thread "P=534201:O=0:CT" com.ibm.mq.jms.JMSWrappedException: MQJMS6115: An exception occured while creating the TopicConnection, exception java.net.ConnectException: Connection refused: connect
at com.ibm.mq.jms.MQTopicConnectionFactory.createDirectTopicConnection(MQTopicConnectionFactory.java:584)
at com.ibm.mq.jms.MQTopicConnectionFactory.createDirectTopicConnection(MQTopicConnectionFactory.java:426)
at com.ibm.mq.jms.MQTopicConnectionFactory.createTopicConnection(MQTopicConnectionFactory.java:201)
at Client.main(Client.java:23) |
|
Back to top |
|
 |
BenR |
Posted: Tue Jan 31, 2006 11:26 pm Post subject: |
|
|
Acolyte
Joined: 31 Jan 2006 Posts: 60 Location: Hursley, UK
|
It looks from the exception as if you have transport set to MQJMS_TP_DIRECT_TCPIP (or MQJMS_TP_DIRECT_HTTP), is that what you intended? |
|
Back to top |
|
 |
navjot |
Posted: Wed Feb 01, 2006 4:25 am Post subject: |
|
|
Newbie
Joined: 31 Jan 2006 Posts: 5
|
Hi
yes, I changed the "PORT" for Topic Connection Factory to Queued instead of direct.
It is working but now i am getting another exception...
Exception in thread "P=266893:O=0:CT" com.ibm.mq.jms.NoBrokerResponseException: MQJMS5053: *** No broker response. Please ensure that the broker is running. If you are using the WebSphere MQ broker check that your brokerVersion is set to V1 ***
my code is following-
TopicConnectionFactory connectionFactory =
(TopicConnectionFactory)new InitialContext().lookup("theTopicConnectionFactory");
System.out.println("HI...working fine "+ connectionFactory);
TopicConnection connection = connectionFactory.createTopicConnection();
connection.start();
TopicSession topicSession =
connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
// topicSession.start();
Topic topic =
(Topic)new InitialContext().lookup("theTopic");
TopicPublisher publisher = topicSession.createPublisher(topic);
Message message = topicSession.createMessage();
message.setJMSType("logMessage");
message.setLongProperty("time", System.currentTimeMillis());
message.setStringProperty("subject", "testing messaging");
message.setStringProperty("message", "testing MDB");
publisher.publish(message);
publisher.close();
topicSession.close();
connection.close();
System.out.println("Message sent"); |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|