I have read and re-read about all the documentation
that I could find on setting MQSeries as a foreign
JMS provider using the "client" transport type
under Weblogic 5.1, but it still doesn't work.
I tried to programmatically create the connection
factory and queue in a startup class using the
vendor specific classes and binding those in
JNDI using the following code:
try {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
env.put(Context.PROVIDER_URL, JNDI_URL);
InitialContext ctx = new InitialContext(env);
// bind queue connection factory
MQQueueConnectionFactory qconFactory = new MQQueueConnectionFactory();
qconFactory.setTransportType(transportType);
qconFactory.setQueueManager(queueManagerName);
qconFactory.setHostName(hostName);
qconFactory.setChannel(channel);
ctx.bind(JMS_FACTORY, qconFactory);
// bind queue
QueueConnection qcon = qconFactory.createQueueConnection();
qcon.start();
QueueSession qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue q = qsession.createQueue(queueName);
ctx.bind(JMS_QUEUE, q);
qsession.close();
qcon.close();
}
catch (Exception e) {
e.printStackTrace();
}
It starts up properly, but when trying to browse the queue,
I get the following exception:
javax.jms.JMSException: MQJMS2008: Could not open queue {translated from French}.
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironm
ent.java:418)
at com.ibm.mq.jms.MQQueueSession.getQueueForBrowse(MQQueueSession.java:6
71)
at com.ibm.mq.jms.MQQueueBrowser.getEnumeration(MQQueueBrowser.java:171)
at test.Tester.testJMS(Tester.java, Compiled Code)
at test.Tester.main(Tester.java)
Any help would be appreciated.
Guillaume Bedard
Apparently, I was getting the exception because the queue
that I was trying to browse was not defined on the same
box as the remote queue manager.
Guillaume Bedard
_sjz.
"Guillaume Bedard" <guillaum...@desjardins.com> wrote in message
news:3c59...@newsgroups.bea.com...