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 Previous  1, 2
 Starting a process when Qm Starts « View previous topic :: View next topic » 
Author Message
WingCommanderBadger
PostPosted: Mon Feb 27, 2006 4:08 am    Post subject: MQ v6 Services in Windows Reply with quote

Apprentice

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

When registered as a Windows service, the command to start would be
Code:
net start "MQ Aggregator"
where "MQ Aggregator" is the service which has been registered with Windows.

If I run the application from the command line, I execute it via a bat file. The bat file itself uses a number of environment variables to locate a configuration file - this is the file that basically tells the app where the STDERR and STDOUT is (a log file in our case) and also contains info about the runtime Java Classpath etc.

If I execute this bat file as an MQ Service, I get an error message in the log file that would seem to indicate that at least one of the MQ jar files can't be located. This is what leads me to believe that the environment variables are not being picked up somehow.
Back to top
View user's profile Send private message
WingCommanderBadger
PostPosted: Mon Feb 27, 2006 4:11 am    Post subject: MQ v6 Services in Windows Reply with quote

Apprentice

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

This is the contents of the bat file to start one of the applications:

Code:

@echo off
setlocal

rem
rem Java Service Wrapper general startup script
rem

rem
rem Resolve the real path of the Wrapper.exe
rem  For non NT systems, the _REALPATH and _WRAPPER_CONF values
rem  can be hard-coded below and the following test removed.
rem
if "%OS%"=="Windows_NT" goto nt
echo This script only works with NT-based versions of Windows.
goto :eof

:nt
rem
rem Find the application home.
rem
rem %~dp0 is location of current script under NT
set _REALPATH=%~dp0
set _WRAPPER_EXE=%_REALPATH%Wrapper.exe

rem
rem Find the wrapper.conf
rem
:conf
set _WRAPPER_CONF="%~f1"
if not %_WRAPPER_CONF%=="" goto startup
set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf"

rem
rem Start the Wrapper
rem
:startup
"%_WRAPPER_EXE%" -c %_WRAPPER_CONF%
if not errorlevel 1 goto :eof
pause
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Feb 27, 2006 5:01 am    Post subject: Reply with quote

Jedi Knight

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

modify your start script to echo the CLASSPATH to a file to see what you're dealing with .....
_________________
-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 Previous  1, 2 Page 2 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.