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 » How to write Trigger message directly in Initiation queue

Post new topic  Reply to topic
 How to write Trigger message directly in Initiation queue « View previous topic :: View next topic » 
Author Message
prasannal
PostPosted: Fri Apr 16, 2004 8:12 am    Post subject: How to write Trigger message directly in Initiation queue Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Apr 16, 2004 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message
prasannal
PostPosted: Thu Apr 22, 2004 7:04 am    Post subject: Populating MQTMC Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 22, 2004 7:45 am    Post subject: Reply with quote

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
View user's profile Send private message
prasannal
PostPosted: Thu Apr 22, 2004 8:34 am    Post subject: Populating MQTMC structure in Java Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Thu Apr 22, 2004 11:03 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to write Trigger message directly in Initiation queue
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.