|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Is there a stop command for "runmqtrm -m -q" ? |
« View previous topic :: View next topic » |
Author |
Message
|
AlexeiSkate |
Posted: Thu Jul 31, 2003 12:15 pm Post subject: Is there a stop command for "runmqtrm -m -q" ? |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
In a previous post I was having problem getting the trigger monitor to run properly via MQServices, and I was able to find an answer in another post about adding MUSER_MQADMIN to the administrator group. I'm able to trigger, via MQServices, command file that execute simple java programs, but when the command file is verbose, i.e. has lots of classpath definitions inside it, I can't get it to work.
Since I know there's a time window when the client will send messages over, what if I set the command file that does "runmqtrm -m -q" to start each day at 8am for example, and I'll let it run for maybe 1 hour. But now I will need a corresponding command file that'll execute 1 hour later to stop the triggering monitor. I remember reading some post that said there is not such command? If I run the "runmqtrm" command file every morning and not stop it then I would have many instances of runmqtrm running every day? Any advice/ hint is appreciated.
Thanks,
Alex |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 31, 2003 12:28 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Quote: |
but when the command file is verbose, i.e. has lots of classpath definitions inside it, I can't get it to work. |
This is why I embed almost all of my java triggered programs inside a batch file. Then I can trigger the batch file, which contains the lots of class path definitions and etc., but the application name field and user data and etc. are small.
I don't know why you want to stop a trigger monitor, and start a new one up. |
|
Back to top |
|
 |
AlexeiSkate |
Posted: Thu Jul 31, 2003 1:34 pm Post subject: |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
Jeff,
A command file is a batch file correct? If my command file is located in c:\test\Run.cmd and inside it has all the classpath declarations and the -java command, then I should just be able to have my process definition points to "c:\test\Run", correct?
When I was playing around with a simple java program that print "Hello", my command file, HelloCmd.cmd has inside it "java -classpath c:\test Hello > c:\test\Out.txt". I had to specify the direct path otherwise it wouldn't run through the trigger monitor defined in MQ Services. So my guess is that there some direct paths I'm not specifying in my Run.cmd file from above.
If I was to run the trigger monitor from Dos, I wouldn't want the DOS window to be opened indefinitely. I want to set a command file as a Window task to open the trigger monitor in DOS at 9am and then close down at perhaps 9:30am; otherwise when the task run again at 9am tomorrow, it would cause another trigger monitor process to run in addition to the previous day one. I guess I'm trying to emulate "real-time" message processing without going through the MQ Services trigger monitor. |
|
Back to top |
|
 |
AlexeiSkate |
Posted: Fri Aug 01, 2003 2:01 pm Post subject: |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
I'm at a loss as to why this particular Run.cmd file won't execute with the trigger monitor running as an MQ Services or as a Window Service (ma7k support pac running on the server side).
I made MSUSER_ADMIN a member of the Administrator group. When I use the ma7k tm, I see in the Event viewer window that it's calling the same program as what is displayed when I use "runmqtrm -m -q". Yet I cannot get my application triggered to get the message, whereas I can get it with runmqtrm. The event viewer also displays "MQCMIT returned 0 for queue INITIATION.LQ and qmgr OPM.QM" and "Rc=0 for MQGET". I guess somehow the ma7k tm can't do a get on the triggered queue? Is there anything that need to be set up or tweak differently when one is using the supportpac or MQ services tm versus using the default runmqtrm?
The weird thing is I can get the scenario working on my PC back in my office but at the setting at the client site, I can't (the path of the Run.cmd is different between the two sites, but that shouldn't matter...). Thanks for any input. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 04, 2003 9:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
AlexeiSkate wrote: |
A command file is a batch file correct? If my command file is located in c:\test\Run.cmd and inside it has all the classpath declarations and the -java command, then I should just be able to have my process definition points to "c:\test\Run", correct?
|
I suppose a batch file and a .cmd file are similar. I meant a text file with dos commands in it, named with a '.bat' extension.
I would include the extension on your process definition, so "c:\test\Run.cmd" instead of "c:\test\Run", to help avoid confusion if for instance you have Run.exe in the same directory.
AlexeiSkate wrote: |
I'm at a loss as to why this particular Run.cmd file won't execute with the trigger monitor running as an MQ Services or as a Window Service (ma7k support pac running on the server side). |
This could be a number of different things. - Your environment variables for MSUSER_ADMIN may not be what you expect them to be - things like Classpath and Path.
- Your MSUSER_ADMIN may not have the proper priviledges to access the queue resources you're trying to get, even though it's in the Administrators group (and therefore the mqm group).
- the command file may not be finding the java.exe runtime
- etc
|
|
Back to top |
|
 |
vanvught |
Posted: Wed Aug 13, 2003 3:16 am Post subject: Is there a stop command for "runmqtrm -m -q" ? |
|
|
 Apprentice
Joined: 02 Jul 2001 Posts: 35 Location: The Netherlands
|
|
Back to top |
|
 |
AlexeiSkate |
Posted: Wed Aug 13, 2003 12:43 pm Post subject: |
|
|
Centurion
Joined: 10 Apr 2002 Posts: 123
|
Hi vanvught,
Are you saying that setting the initation queue GET property to DISABLED will shut down the tm if the tm was started by "runmqtrm -m -q"? I guess I can give it a try ... |
|
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
|
|
|
|