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 » Trigerring Using MQSeries java

Post new topic  Reply to topic
 Trigerring Using MQSeries java « View previous topic :: View next topic » 
Author Message
sam
PostPosted: Thu May 09, 2002 11:41 am    Post subject: Reply with quote

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
View user's profile Send private message
krishrammohan
PostPosted: Thu May 09, 2002 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
sam
PostPosted: Thu May 09, 2002 6:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
amurugan
PostPosted: Thu May 09, 2002 7:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
mont3joy
PostPosted: Fri May 10, 2002 11:21 am    Post subject: Reply with quote

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
View user's profile Send private message
AlexeiSkate
PostPosted: Mon May 13, 2002 7:14 am    Post subject: Reply with quote

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
View user's profile Send private message
mrlinux
PostPosted: Mon May 13, 2002 7:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
bduncan
PostPosted: Mon May 13, 2002 9:58 am    Post subject: Reply with quote

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

MQSeries.net Forum Index » IBM MQ Java / JMS » Trigerring Using MQSeries java
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.