|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ Series Error Code : 2045 |
« View previous topic :: View next topic » |
Author |
Message
|
Praveen |
Posted: Thu Nov 07, 2002 12:19 am Post subject: MQ Series Error Code : 2045 |
|
|
 Apprentice
Joined: 23 Oct 2002 Posts: 40 Location: Bangalore
|
Hi All,
I am trying to run a java program which is sending a message to server and getting it back. But I am getting this error code 2045 which is related to "openOptions", this is what I had specified
********************************************************
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_SET | MQC.MQOO_INPUT_EXCLUSIVE
MQQueue system_default_local_queue = qMgr.accessQueue("LOCAL.DEF.OF.REMOTE.QUEUE", openOptions);
********************************************************
Where "LOCAL.DEF.OF.REMOTE.QUEUE" is my local definition of remote queue.
Can anybody guide me what are the correct values I need to give.
Thanks in advance
Praveen K. |
|
Back to top |
|
 |
bob_buxton |
Posted: Thu Nov 07, 2002 12:59 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
You can only put to a remote queue so MQOO_INPUT_xxx is not valid for a remote queue.
You should use another local queue to receive your reply messages.
PS It is not normally necessary/desirable to post to multiple forums. _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
Praveen |
Posted: Thu Nov 07, 2002 6:26 am Post subject: |
|
|
 Apprentice
Joined: 23 Oct 2002 Posts: 40 Location: Bangalore
|
Hi,
I am attaching a piece of my code, can you just tell me which all options I need to give and where should I mention another local queue to get the messages.
*************************************************************
qMgr = new MQQueueManager(qManager);
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_SET | MQC.MQOO_INPUT_EXCLUSIVE;
MQQueue system_default_local_queue = qMgr.accessQueue("LOCAL.DEF.OF.REMOTE.QUEUE", openOptions);
MQMessage hello_world = new MQMessage();
hello_world.writeUTF("Hello World!");
MQPutMessageOptions pmo = new MQPutMessageOptions();
system_default_local_queue.put(hello_world,pmo);
MQMessage retrievedMessage = new MQMessage();
retrievedMessage.messageId = hello_world.messageId;
MQGetMessageOptions gmo = new MQGetMessageOptions();
system_default_local_queue.get(retrievedMessage, gmo);
String msgText = retrievedMessage.readUTF();
System.out.println("Retrieved Message is...." + msgText);
system_default_local_queue.close();
qMgr.disconnect();
*************************************************************
I am newbie to MQSeries, please help me out.
Sorry for posting the question in multiple forums.
Thanks in advance.
Praveen K. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Nov 07, 2002 8:52 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Note to newbies, when posting code, please wrap your code with the BBCode tags of [code] and [/code] - it makes the code much more readable.
Change your openOptions to be:
int openOptions = MQC.MQOO_OUTPUT;
and you should be fine.
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
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
|
|
|
|