ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Sending gateway via MQ jms native connection

Post new topic  Reply to topic
 Sending gateway via MQ jms native connection « View previous topic :: View next topic » 
Author Message
MooseMcDowell
PostPosted: Tue Oct 21, 2014 9:02 am    Post subject: Sending gateway via MQ jms native connection Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 21, 2014 7:08 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
MooseMcDowell
PostPosted: Wed Oct 22, 2014 4:35 am    Post subject: Reply with quote

Newbie

Joined: 01 Nov 2011
Posts: 8

You're absolutely right.

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Sending gateway via MQ jms native connection
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.