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 Installation/Configuration Support » Starting a process when Qm Starts

Post new topic  Reply to topic Goto page 1, 2  Next
 Starting a process when Qm Starts « View previous topic :: View next topic » 
Author Message
chinna
PostPosted: Mon Jun 06, 2005 5:35 am    Post subject: Starting a process when Qm Starts Reply with quote

Newbie

Joined: 27 May 2005
Posts: 8

Hi All,
Is there any way to start/stop the process when QueueManager Starts and Stops.If anyone have the documents or sample please send me.
Thanks in Advance.

Regards
Chinna
Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Mon Jun 06, 2005 5:42 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Chinna,

I would suggest you look at the new "service" object in MQ V6. This allows you top start and stop programs with the qmgr.
Back to top
View user's profile Send private message Send e-mail AIM Address
jefflowrey
PostPosted: Mon Jun 06, 2005 5:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Actually, there are Custom Services available in 5.3 - at least on Windows.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Jun 06, 2005 5:54 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Chinna, what platform are you talking about?

As an example, you can cause ms03 (saveqmgr) to automatically
run each time the qmgr starts by created a service definition, viz:

define service('ms03') +
startcmd('c:\ms03\saveqmgr.exe') +
startarg(-m +QMNAME+ -f c:\temp\+QMNAME+.mqsc -o') +
stdout('c:\temp\ms03.stdout') +
stderr('c:\temp\ms03.stderr') +
control(startonly) +
servtype(command)

The "+QMNAME+" strings gets replaced by the qmgr with its own name at runtime
Back to top
View user's profile Send private message Send e-mail AIM Address
chinna
PostPosted: Mon Jun 06, 2005 5:57 am    Post subject: Reply with quote

Newbie

Joined: 27 May 2005
Posts: 8

I am looking on Windows,Solaris, AIX, HPUX.
Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Mon Jun 06, 2005 6:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

In that case, the "service" object in MQ V6 is best, as it provides a common method to start and stop programs across all those platforms.
Back to top
View user's profile Send private message Send e-mail AIM Address
chinna
PostPosted: Mon Jun 06, 2005 7:24 pm    Post subject: Reply with quote

Newbie

Joined: 27 May 2005
Posts: 8

but out requirement is for V5.3.Is there any way to do the same in V5.3
Back to top
View user's profile Send private message Send e-mail
Michael Dag
PostPosted: Wed Jun 08, 2005 5:49 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

wschutz wrote:
The "+QMNAME+" strings gets replaced by the qmgr with its own name at runtime

where is this documented?
are there other 'runtime' variables that can be used with V6?
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
EddieA
PostPosted: Wed Jun 08, 2005 8:39 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
are there other 'runtime' variables that can be used with V6

This isn't a V6 enhancement. It's been there for a while. And I think +QMNAME+ is the only one.

The only place I've seen it documented is in the Clustering Manual.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Wed Jun 08, 2005 8:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

EddieA wrote:
This isn't a V6 enhancement.

Well maybe not QMNAME, but just found the following in the WebSphere MQ V6.0 Information Center:

replaceable inserts on service definitions!
MQ_INSTALL_PATH
MQ_DATA_PATH
QMNAME
MQ_SERVICE_NAME
MQ_SERVER_PID (can only be used by the STOPARG and STOPCMD arguments)
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
wschutz
PostPosted: Wed Jun 08, 2005 8:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
but out requirement is for V5.3.Is there any way to do the same in V5.3


Usually, people write scripts that they use to start and stop mq and then those scripts also stop and stop whatever other services they like. However, that all fails when someone just types in strmqm/endmqm. The new V6 "service" object gets around that problem.
Back to top
View user's profile Send private message Send e-mail AIM Address
WingCommanderBadger
PostPosted: Mon Feb 27, 2006 1:31 am    Post subject: MQ v6 Services in Windows Reply with quote

Apprentice

Joined: 06 Sep 2005
Posts: 32
Location: London, UK

I'm trying to use the MQ Services functionality on Windows. I'm running MQ v6 and I have a number of applications which I have configured to run as Window Services (i.e. I can start and stop them via the 'Computer Management' console in Windows or I can issue a 'net start' or 'net stop' command). This all works fine, however I now wish to tie the stopping and starting of these services to the Queue Manager. For some reason, the service starts and then instantly stops (according to the Windows Event Logs) but I can't see any information about why this happens!

Has anyone tried this before or have any advice about how to get it to work? The RedBooks I've looked though don't seem to be much use to me (MQv6 Admin Guide etc).

Thanks in advance.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Feb 27, 2006 2:50 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Are you saying these applications are coded as "Windows services"?

Can you run the programs from a command line (dos prompt)? You need to be able to run the programs as a normal windows executable on the command line, and then ensure you paste the same command into your service definition.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
WingCommanderBadger
PostPosted: Mon Feb 27, 2006 3:05 am    Post subject: MQ v6 Services in Windows Reply with quote

Apprentice

Joined: 06 Sep 2005
Posts: 32
Location: London, UK

The services themselves are actually written in Java, but I have wrapped them using Tanuki Software's "Java Service Wrapper" (http://wrapper.tanukisoftware.org/doc/english/introduction.html). The scripts that come with the Java Service Wrapper mean that you can start the applications from the command line if you wish or you can 'register' them with Windows as a service, thus allowing you to stop and start them using the Windows Computer Management GUI, and allowing them to run when no-one is logged onto the Windows box.

The scripts themselves look quite simple but they do seem to use a number of environment variables - I wonder if these are not being set correctly when MQ attempts to execute these scripts.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Feb 27, 2006 3:10 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

so the command the service is starting is" "java tanuki-classes.....", or are you starting a bat file.... I would also check in the amqerr01.log file for errors ....
also, did you set files for STDERR and STDOUT in the service's definition?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Starting a process when Qm Starts
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.