|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQJMS2008 on alias queue |
« View previous topic :: View next topic » |
Author |
Message
|
AlainB |
Posted: Tue Mar 11, 2003 4:53 am Post subject: MQJMS2008 on alias queue |
|
|
 Voyager
Joined: 31 Oct 2002 Posts: 79 Location: Belgium
|
Hi all,
We have a strange problem ! A JAVA application sends messages to another queue manager thru a remote queue definition. This is working fine ! If I 'change' this remote queue to become an alias queue pointing on a remote queue, I have an MQJMS2008 error !
javax.jms.JMSException: MQJMS2008: failed to open MQ queue
That's very strange, as there is no special between these 2 definitions (except alias / remote).
Any idea why ?
Here is a part of the code used ... some objects are custom objects :
TACSYQueueConnectionFactory queueConnectionFactory = pConnFactory;
queueConnection = queueConnectionFactory.createQueueConnection();
session = queueConnection.createQueueSession(false, 1);
javax.jms.Queue reqQueue = session.createQueue(reqQueueName);
javax.jms.Queue rlyQueue = session.createQueue(rlyQueueName);
QueueSender queueSender = session.createSender(reqQueue);
queueConnection.start();
TextMessage msg = session.createTextMessage();
msg.setText(query);
msg.setJMSReplyTo(rlyQueue);
msg.setJMSDeliveryMode(1);
queueSender.send(msg);
javax.jms.QueueReceiver queueReceiver = session.createReceiver(rlyQueue, "JMSCorrelationID='" + msg.getJMSMessageID() + "'");
Message outMessage = queueReceiver.receive(30000);
TACSYTextMessage fullAnswer = (TACSYTextMessage)session.createTextMessage();
queueConnection.close();
session.close();
Thanks in advance
Alain _________________ Alain Buret
Visit http://www.fosdem.org |
|
Back to top |
|
 |
meekings |
Posted: Tue Mar 11, 2003 8:04 am Post subject: |
|
|
 Voyager
Joined: 28 Jun 2001 Posts: 86 Location: UK, South West
|
What's the underlying MQ error? (use getLinkedException()) |
|
Back to top |
|
 |
nimconsult |
Posted: Wed Mar 12, 2003 1:39 am Post subject: |
|
|
 Master
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
|
There are multiple reasons to a MQJMS2008.
Assuming it works on the remote queue (opened in output I assume) and does not work on the alias that refers the remote queue, one of the possibilities that comes into my mind is an authorization error.
Please report the linked exception with some coding like:
Code: |
...
catch(JMSException myJMSException)
{
System.err.println(myJMSException.getLinkedException());
} |
or
Code: |
...
catch(JMSException myJMSException)
{
System.err.println(myJMSException.getLinkedException().printStackTrace());
} |
Good luck!
Nicolas _________________ Nicolas Maréchal
Senior Architect - Partner
NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be |
|
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
|
|
|
|