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 » General IBM MQ Support » Application Triggering

Post new topic  Reply to topic
 Application Triggering « View previous topic :: View next topic » 
Author Message
trinath
PostPosted: Thu Jul 10, 2014 1:38 am    Post subject: Application Triggering Reply with quote

Apprentice

Joined: 02 Jun 2014
Posts: 34

Hi all

please tell me, how to call java class by using Triggering, please provide some example code
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Thu Jul 10, 2014 2:40 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Well, it probably depends on the environment you want. There is a different trigger monitor for each environment and the commands to start the program are different. MQ generates the trigger message but it is up to the trigger monitor to actually start the application. MQ does provide a number of trigger monitors with the product but there is nothing to stop you writing your own if you have a different environment.


For a simple JAVA program it should be possible just to use the standard RUNMQTRM. In the process object you would just specify the command you wish to run. Something like....java myprog etc

Does that help at all?

Paul
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Thu Jul 10, 2014 12:09 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

I always found it easier to create a shell script (Unix/Linux) or batch file (Windows) to set the environment variables like JAVA_HOME, CLASSPATH, etc.. and then invoke the JVM. I use the shell script/batch file in the process definition.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
trinath
PostPosted: Thu Jul 10, 2014 7:40 pm    Post subject: Reply with quote

Apprentice

Joined: 02 Jun 2014
Posts: 34

thank you for reply

please tell me, how to convert java class to batch file
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Jul 10, 2014 8:21 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

trinath wrote:
please tell me, how to convert java class to batch file

You don't convert anything.

Rather, you create a batch script that contains each and every one of the command-line commands necessary to successfully execute the java class. It is the name of this batch script that you specify in the process definition.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Jul 11, 2014 5:58 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Search this site on triggering java. Its been discussed before. Jeff wrote up a detailed set of instructions several years ago on it.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 11, 2014 1:51 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And the other presentation a few years ago (nearly 10) at the user group:
http://www.nynjmq.org/Triggering%20the%20right%20Java%20Environment.zip
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Application Triggering
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.