|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to enable Trigger Monitor on MQSeries for Windows NT |
« View previous topic :: View next topic » |
Author |
Message
|
abanerjee |
Posted: Mon Mar 18, 2002 5:48 am Post subject: |
|
|
Guest
|
Hi!,
I working on MQSeries Java/Windows NT ver 5.2.
I want to test queue triggering on NT platform with back end program as java.
i.e. A program puts a message on a queue. The moment the message is there, the back end java program should run and print something on the console.
I di following :
The Queue Manager, queue are created and working fine (without Trigger)
I defined a Process inthe queue and, make the Trigger ON and TrigType =Every, Depth = 1.
I created a Process and in ApplType = Windows NT, ApplID = c:test.bat
Here the test.bat contains following lines
javac TestApp.java
java TestApp
pause
That is my moto is the moment a message is there on the queue, this batch file should be executed and on command prompt I can see the o/p.
All the MQ Objects (queues, Process, ...) are created using MQ Explorer.
So If u can please help me as after this successful testing on NT only I can move to AS400. So if u can give any suggessions where I am wrong...
Thanx
|
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Mar 18, 2002 10:10 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
So what is your problem? (You don't actually say what the problem is.)
- Do you have a trigger monitor running?
- Did the program (test.bat) trigger?
- Did the TestApp run successfully?
- If not, what are return / completion codes? What class / method failed? (e.g. MQQueueManager or MQQueue or MQMessage etc...)
Also, you don't need to compile your java class every time the program is triggerred.
later
Roger...
|
|
Back to top |
|
 |
abanerjee |
Posted: Mon Mar 18, 2002 10:35 pm Post subject: |
|
|
Guest
|
I run the TriggerMonitor issuing the following commands
runmqtrm -m MQSampleQM -q SYSTEM.DEFAULT.INITIATION.QUEUE
It runs in the command prompt and message comes like the "Waitting for Trigger Message..."
As I mentioned in my previous post, I created, a Process, Queue .. using MQSeries Explorer.
I entered in Process creation window of MQ Explorer the following :
Application Type : Windows NT
Application Identifier : c:test.bat
When I run my java program to put a message. I can see using MQ Explorer that Message was put by MQ Client for java.
But in my console it gives the following error :
MQJE003: IO error transmitting message buffer
MQJE001: Completion Code 2, Reason 2009
MQJE003: IO error transmitting message buffer
MQJE001: Completion Code 2, Reason 2009
MQJE003: IO error transmitting message buffer
MQJE001: Completion Code 2, Reason 2009
MQJE003: IO error transmitting message buffer
MQJE001: Completion Code 2, Reason 2009
I take the message put/get code snippet from one of the sample program OrderListView applet of the pdf : sg244896 (MQ Java and Internet Application)
Also If you can tell how to know about Reason Code and Completion Code.
Thanx |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Mar 19, 2002 9:20 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
You need the MQ Appl. Programming Reference book:
ftp://ftp.software.ibm.com/software/ts/mqseries/library/books/csqzak05.pdf
The return codes and completion codes are in Appendix A.
Note: Completion code 2009 is "connection broken". This usually occurs when you code the queue manager name incorrectly (e.g. ip and port are correct) for the connect. Note: Queue Manager names (all MQ object names) are case sensitive, so check your spelling.
later
Roger...
|
|
Back to top |
|
 |
abanerjee |
Posted: Tue Mar 19, 2002 9:39 pm Post subject: |
|
|
Guest
|
Hi Roger,
You were absolutely right. Now sceene is that I can put a message through one application and can retrieve the message as well with another one.
But one doubt Do I need to write Trigger Monitor myself. Is it not a MQ command like MQCONN or so. As my Triggering is not working. I am using runmqtrm command.
I put the message on a queue through a Servlet, then wait options are there, thereafter I try to read the message. But the trigger event has not happened, so back end Java bean does not put any message.
So What to do
Thanx
|
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Mar 20, 2002 10:03 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
First, check to make sure that your appl. queue has the correct attributes (e.g. Trigger ON, Trigger First, INIT Q name set, PROCESS name set, etc...).
Second, is the trigger monitor running (pointing to the correct INIT Q)?
Third, verify that your process definition is pointing to the correct program. Cut & paste the Appl. Name from the process definition in MQ Explorer to a CMD prompt - does it run?
later
Roger...
|
|
Back to top |
|
 |
Naftalanja |
Posted: Thu Mar 21, 2002 5:16 pm Post subject: |
|
|
Acolyte
Joined: 30 Jan 2002 Posts: 63 Location: Los Angeles
|
ABanerjee, i think you are missing the key point in creating a Trigger Monitor.
You need to create an Initiation Queue which could be MY.INITQ which is a local Q type. I dont have MQ Series Explore in front of me rite now but When you create a process or Trigger monitor i think it asks for Init Q, so mention this Queue name. Your batch file is fine and everything is fine. In the Queue where you want a trigger to be fired, give the process definition which you have defined. So this intermediary queue is very much necessary for triggering purpose and there where the trigger monitor picks up the message i think so. best of luck with as400  |
|
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
|
|
|
|