Author |
Message
|
sam |
Posted: Thu May 09, 2002 11:41 am Post subject: |
|
|
Acolyte
Joined: 02 Apr 2002 Posts: 52
|
I understand the basics of trigerring, but I'm confused regarding the process definitions for the queue. If I want to start a Java program once I recieve a message on a queue, how do I do that. I mean how do I say something like, start this java program com.sun.java.MyProgram when I recieve a message on my queue? Thank you all. |
|
Back to top |
|
 |
krishrammohan |
Posted: Thu May 09, 2002 12:25 pm Post subject: |
|
|
Newbie
Joined: 11 Aug 2001 Posts: 9
|
You can look at Chapter 14. "Starting MQSeries applications using triggers" in MQSeries Application Programming Guide to understand the triggering process.
For triggering Java program, if you are working on Windows OS, you can create a batch file with "java <program name>" and specify the complete path where batch file is located in Application Identifier field while defining the process definitions. |
|
Back to top |
|
 |
sam |
Posted: Thu May 09, 2002 6:35 pm Post subject: |
|
|
Acolyte
Joined: 02 Apr 2002 Posts: 52
|
Thanks. Is this same for Unix too? I mean i need to create a .sh and give the complete path to it in the Application Identifier right? |
|
Back to top |
|
 |
amurugan |
Posted: Thu May 09, 2002 7:08 pm Post subject: |
|
|
Voyager
Joined: 10 Sep 2001 Posts: 75 Location: india
|
hi ,
You gotto create a shell script that will fire the java program and the name of this shell script will be given in the process definition . Try it amd let me know whether does it work
cheers,
Murugan |
|
Back to top |
|
 |
mont3joy |
Posted: Fri May 10, 2002 11:21 am Post subject: |
|
|
Newbie
Joined: 09 May 2002 Posts: 1
|
Here is how I triggered the MQIVP sample in the process definition.
define process(JAVATEST.P) applicid('java -classpath /opt/mqm/java/samples/base:/opt/mqm/java/lib:/opt/mqm/java/lib/com.ibm.mq.jar:/
opt/mqm/java/lib/connector.jar: MQIVP') replace
cheers, Rich |
|
Back to top |
|
 |
AlexeiSkate |
Posted: Mon May 13, 2002 7:14 am Post subject: |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
Hi,
I am trying to do the same thing...triggering a java program. I read the replies above and still have a few questions.
1) For the Process name, can I give it any string name I want ?
3) For the APPLICID, can I point it to my java class file, or do I need to point it to a batch command file as mentioned by one poster in order to execute my Java program ?
4) For the APPLTYPE, do I specify MQAT_WINDOWS_NT variable, or can I not specify that ?
5) Is the USERDATA a parameter that I can pass to my triggered program, and can I not define it if my program doesn't take parameters ?
Thanks for anyone that can reply. |
|
Back to top |
|
 |
mrlinux |
Posted: Mon May 13, 2002 7:19 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
I can answer 1 & 5
1) Process name can be any valid string.
5) if you dont have any userdata then leave field blank _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
bduncan |
Posted: Mon May 13, 2002 9:58 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Hey, what happened to question #2 ??
Anyway, here's the answers to your other questions:
Quote: |
3) For the APPLICID, can I point it to my java class file, or do I need to point it to a batch command file as mentioned by one poster in order to execute my Java program ?
|
You can point it to any executable file. This would include scripts. But a java class file won't work. You can however stick the entire call to java, specifying your class file in the APPLICID field, and this will work.
Quote: |
4) For the APPLTYPE, do I specify MQAT_WINDOWS_NT variable, or can I not specify that ?
|
Interesting, I had never seen MQAT_WINDOWS_NT before, and sure enough, in the Application Programming Reference, there was a whole list of operating systems with MQAT_ prepended, so apparently you can use these in the APPLTYPE field. However, I've always used just "UNIX" and "WINNT" and they seem to work fine. Apparently the queue manager recognizes these as equivalent to MQAT_UNIX and MQAT_WINDOWS_NT respectively... _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
|