|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
The Trigger Message (MQTM) as ARG[0] |
« View previous topic :: View next topic » |
Author |
Message
|
duffMan |
Posted: Wed Nov 27, 2002 11:25 am Post subject: The Trigger Message (MQTM) as ARG[0] |
|
|
 Voyager
Joined: 03 Jun 2002 Posts: 75
|
Hi,
I'm quite new a Java, so you'll have to answer in a "for dummies tone". I'm triggering a java application using the sample trigger monitor provided with MQSeries. Of course I want to make the java program as generic as possible, so I wish to extract the queue manager and queue name from the trigger message.
I noticed that, like in C, the trigger message is passed to my java program as a long string in arg[0].
Is there an method available which essentially parses the trigger message or do I simply have to use substring type functions to get at the data I want??
Thanks,
Jason. |
|
Back to top |
|
 |
bduncan |
Posted: Wed Nov 27, 2002 2:31 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Hmm... Interesting question. I've never tried something like that before (always resorted to parsing the ARG[0] string) but you might want to try simply casting the String to a MQMessage object. I'm not sure if special messages like trigger messages or dead letter messages have corresponding objects in the Java API since they do have that additional header info, but hey, it's probably worth a try... _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
duffMan |
Posted: Thu Nov 28, 2002 6:30 am Post subject: |
|
|
 Voyager
Joined: 03 Jun 2002 Posts: 75
|
Thanks. I'll probably end up parsing the arg[0] string because after a bit of investigation it appears that the Queue Manger name is not part of the MQTM stucture. It is something that is added by sample trigger monitor itself.
Although your suggestion may be worth investigating, or even building if it doesn't already exist. |
|
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
|
|
|
|