Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem setting up MQSeries as a foreign JMS provider

1 view
Skip to first unread message

Guillaume Bedard

unread,
Jan 31, 2002, 12:03:42 PM1/31/02
to

Hi!

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

Guillaume Bedard

unread,
Jan 31, 2002, 5:00:02 PM1/31/02
to

I have finally succeeded configuring MQSeries as the JMS
provider.

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

Zach

unread,
Feb 1, 2002, 2:31:42 AM2/1/02
to
MQSeries limitation. You can only dequeue from local queues. You think
that they would fail the creation of the browser though (not the
enumeration). They let you create a useless browser.

_sjz.

"Guillaume Bedard" <guillaum...@desjardins.com> wrote in message
news:3c59...@newsgroups.bea.com...

0 new messages