• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to connect a reomte jms server  RSS feed

mmccrr mmccrr
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my code is works well if jms server is localhost,but if i want to connect a remote jms server(such as ip:,exception will happens.What should i do? or any configuration should i change?

my code is following:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
url = "corbaloc:iiop:localhost:2809";
env.put(Context.PROVIDER_URL, url);
env.put(Context.SECURITY_CREDENTIALS, "cehs");
Context ctx = new InitialContext(env);
String strQueueConnFactName = "jms/MessagingConnectionFactory";
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup(strQueueConnFactName);
connection = factory.createQueueConnection();
session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
if i change the url to "corbaloc:iiop:"
the exception occured:
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''

what should i do?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!