Author |
Message
|
prasannal |
Posted: Fri Apr 16, 2004 8:12 am Post subject: How to write Trigger message directly in Initiation queue |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi,
I want to create a Trigger message which I will put in Initiation queue, so that Trigger Monitor will read it and take action.
I want to do this using JAVA.
Any suggestions on this?
Thanks,
Plad |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 16, 2004 8:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why do you want to do this?
But, what you will need to do is, manually create a message that contains all the necessary fields of the MQTMC structure. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasannal |
Posted: Thu Apr 22, 2004 7:04 am Post subject: Populating MQTMC |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi,
Anyone has code block which shows how to poulate MQTMC structure in Java. Pls let me know.
Thanx.
Plad |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 22, 2004 7:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Here's the algorithm:
For each field defined in the MQTMC structure, use the corresponding writeXXXX method on the message to populate the correct data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasannal |
Posted: Thu Apr 22, 2004 8:34 am Post subject: Populating MQTMC structure in Java |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi,
MQTMC has following fields-
String structId;
String version;
String qName;
String processName;
String triggerData;
String applType;
String applId;
String envData;
String userData;
String qMgrName;
So, to create a Trigger message to be put on initiation queue, I will have to write-
MQMessage message = new MQMessage();
message.writeString(varStructID);
-----
and so on.
Also, do I need to take care of length of these String values?
-Plad |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Apr 22, 2004 11:03 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Yes, the length is important. If you'll look at the cmqc.h, you'll get the structure and the length of the various fields. |
|
Back to top |
|
 |
|