|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Question about putApplicationName property |
« View previous topic :: View next topic » |
Author |
Message
|
peterw686 |
Posted: Thu Sep 26, 2002 12:24 pm Post subject: Question about putApplicationName property |
|
|
Acolyte
Joined: 26 Sep 2002 Posts: 73
|
Hi I am new to MQSeries. I have a question about "putApplicationName" property of MQMessage. It seems that MQ disregards what I set up and always assigned it as "MQSeries Client for Java". My example fragment codes list below.
Code: |
MQEnvironment.hostname = hostName;
MQEnvironment.channel = channel;
MQEnvironment.port = port;
MQEnvironment.userID = user;
MQEnvironment.password = password;
MQEnvironment.properties.put( MQC.TRANSPORT_PROPERTY,
MQC.TRANSPORT_MQSERIES_CLIENT);
// create queue manager
mqManager = new MQQueueManager(queueManager);
int openOptions = MQC.MQOO_OUTPUT;
// specify the queue that wish to open
queue = mqManager.accessQueue(queueName, openOptions);
// get the message
MQMessage mqMsg = new MQMessage();
// set the application name
mqMsg.putApplicationName = "Omega/eBCCS";
mqMsg.writeUTF(xmlMsg);
// specify the message options
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options = MQC.MQPMO_NONE;
// put message to the queue
queue.put(mqMsg, pmo);
// close the queue
queue.close();
// disconnect from the queue manager
mqManager.disconnect(); |
Any comments are helpful. Thanks in advance. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Sep 26, 2002 12:34 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
According to the Application Programming Reference:
For the MQPUT and MQPUT1 calls, this is an input/output field if MQPMO_SET_ALL_CONTEXT is specified in the PutMsgOpts parameter. If MQPMO_SET_ALL_CONTEXT is not specified, this field is ignored on input and is an output-only field.
I'd try setting this PMO option and give it another go. |
|
Back to top |
|
 |
peterw686 |
Posted: Fri Sep 27, 2002 11:54 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2002 Posts: 73
|
Thanks. If I want to set the putOption to MQPMO_SET_ALL_CONTEXT, any modification of code needed? |
|
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
|
|
|
|