|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Sending gateway via MQ jms native connection |
« View previous topic :: View next topic » |
Author |
Message
|
MooseMcDowell |
Posted: Tue Oct 21, 2014 9:02 am Post subject: Sending gateway via MQ jms native connection |
|
|
Newbie
Joined: 01 Nov 2011 Posts: 8
|
Hi -
Haven't posted in a while. Forgive me if this is already posted but I wasn't able to find it.
We're trying to get away from bindings files on one of our heavy applications. The queue destinations sometimes contain a gateway, like
GATEWAY/QUEUENAME
When I try to test our new native setup with this type of destination I'm getting the following error:
com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSWMQ2008: Failed to open MQ queue 'GATEWAY/QUEUENAME'. JMS attempted to perform an MQOPEN, but WebSphere MQ reported an error....
Is it possible to connect to a destination with native MQ jms in this way?
Code for queue creation posted below...pretty standard.
//Start
JmsFactoryFactory ff = JmsFactoryFactory.getInstance(WMQConstants.WMQ_PROVIDER);
JmsConnectionFactory cf = ff.createConnectionFactory();
// Set the properties
cf.setStringProperty(WMQConstants.WMQ_CHANNEL, m_channel);
cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT);
cf.setIntProperty(WMQConstants.WMQ_CLIENT_RECONNECT_OPTIONS, WMQConstants.WMQ_CLIENT_RECONNECT);
cf.setStringProperty(WMQConstants.WMQ_CONNECTION_NAME_LIST, m_connectionList);
m_jmsConnection = cf.createConnection();
m_jmsDestination = new MQQueue(m_destinationName);
//End
Any help is greatly appreciated.
Update - We're running against MQ 7 in this case.
Update 2 - Linked Exception:
WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
..but the gateway most definitely exists on the QM. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 21, 2014 7:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are you per chance mixing JMS and java base code?
Code: |
m_jmsDestination = new MQQueue(m_destinationName); |
Your code should look like
Code: |
String myqueuename = "queue://GATEWAY/QUEUENAME";
Destination mydest = session.createQueue(myqueuename); |
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
MooseMcDowell |
Posted: Wed Oct 22, 2014 4:35 am Post subject: |
|
|
Newbie
Joined: 01 Nov 2011 Posts: 8
|
You're absolutely right.
Thanks! |
|
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
|
|
|
|