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 » IBM MQ Java / JMS » The Trigger Message (MQTM) as ARG[0]

Post new topic  Reply to topic
 The Trigger Message (MQTM) as ARG[0] « View previous topic :: View next topic » 
Author Message
duffMan
PostPosted: Wed Nov 27, 2002 11:25 am    Post subject: The Trigger Message (MQTM) as ARG[0] Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Wed Nov 27, 2002 2:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
duffMan
PostPosted: Thu Nov 28, 2002 6:30 am    Post subject: Reply with quote

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
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 » IBM MQ Java / JMS » The Trigger Message (MQTM) as ARG[0]
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.