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 » General Discussion » MQ Series and Hermes + Remote Queue

Post new topic  Reply to topic
 MQ Series and Hermes + Remote Queue « View previous topic :: View next topic » 
Author Message
sbuster
PostPosted: Wed Sep 26, 2012 8:36 am    Post subject: MQ Series and Hermes + Remote Queue Reply with quote

Apprentice

Joined: 07 Oct 2008
Posts: 25

I'm trying to connect Hermes to a remote queue definition which only allows PUT, not ready. Based on the MQ error (com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2045'.
) I think it is trying to do a read. Does anyone know what value to set to make this read only?

For example, on the MQConnectionOptions of the MQQueueConnectionFactory is there a specific value I should put in?

Thanks
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Wed Sep 26, 2012 1:56 pm    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Restrict your open options to output only.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 26, 2012 8:23 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

vmcgloin wrote:
Restrict your open options to output only.

You're not setting the options in JMS.
More likely he is trying to do a browse or a read
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sbuster
PostPosted: Thu Sep 27, 2012 5:29 am    Post subject: Reply with quote

Apprentice

Joined: 07 Oct 2008
Posts: 25

I understand what I'm doing wrong, my question was HOW to make this read only? A person can get lost pretty quick in all the "options" when opening a queue.
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Sep 27, 2012 6:02 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

sbuster wrote:
I understand what I'm doing wrong, my question was HOW to make this read only?

Only open the queue for OUTPUT - simples!
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
sbuster
PostPosted: Thu Sep 27, 2012 7:56 am    Post subject: Reply with quote

Apprentice

Joined: 07 Oct 2008
Posts: 25

Bad choice of words, I do not want to open it up as read only.

Here is the piece of code I believe I need help with.

MQConnectionFactory cf = new MQConnectionFactory();
int openOptions = ???
cf.setMQConnectionOptions(openOptions);


What options do I use for openOptions?????

And further more, is this hte same option for JMS classes?
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Sep 27, 2012 8:08 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

You open a QREMOTE for OUTPUT only, there is no other option, the following being from one of the IBM java samples:

Code:
// Create a connection to the QueueManager
MQQueueManager qMgr = new MQQueueManager(qManager, qCCDT);

// Set up the options on the queue we wish to open
int openOptions = MQConstants.MQOO_OUTPUT;

// Now specify the queue that we wish to open and the open options
MQQueue queue = qMgr.accessQueue(qQueue, openOptions);

// Define a simple WebSphere MQ Message and write some text in UTF8 format
MQMessage msg = new MQMessage();

// Specify the default put message options
MQPutMessageOptions pmo = new MQPutMessageOptions();

// Put the message to the queue
queue.put(msg, pmo);


From the above, and with the Application Programming Guide, you should be able to work out the requirements.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
sbuster
PostPosted: Thu Sep 27, 2012 8:24 am    Post subject: Reply with quote

Apprentice

Joined: 07 Oct 2008
Posts: 25

Thanks, do you have a sample for JMS based classes? I can't find one and when I use the value you have provided I get the following error.

int openOptions = MQConstants.MQOO_OUTPUT;
cf.setMQConnectionOptions(openOptions);

Exception in thread "main" com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ1006: The value '16' for property 'Invalid connection options when in client mode' is not valid. The value specified for the property is not supported. Modify the value to be within the range of accepted values.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Sep 27, 2012 8:43 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Have a look in the tools/jms/samples directory of your installation, assuming you have installed that component on your test infrastructure.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
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 » General Discussion » MQ Series and Hermes + Remote Queue
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.