|
From: Leif M. <le...@ta...> - 2006-01-27 01:37:34
|
Jim,
Are you running on Windows or a UNIX platform? In either case, you
need to
modify the script used to launch the Wrapper so the additional
parameters passed to
the script will be passed on to the Wrapper when it is launched.
First modify your wrapper.conf as follows:
wrapper.app.parameter.1=com.farrow.imaging.ScannedImageCopier
wrapper.app.parameter.2=1
wrapper.app.parameter.3=start
wrapper.app.parameter.4=com.farrow.service.ShutdownService
wrapper.app.parameter.5=true
wrapper.app.parameter.6=2
wrapper.app.parameter.7=stop
wrapper.app.parameter.8=PARAM1_PLACEHOLDER
Then modify your App.bat.in script as follows: (Windows)
"%_WRAPPER_EXE%" -c %_WRAPPER_CONF% wrapper.app.parameter.8=%1
This will take the first parameter to the batch file and use it as
the 8th parameter
when launching the JVM. It is not possible to specify such a parameter
when stopping
the service. You have to know what it will be when the service is
started in the first
place. This will work when installing the service as well. "-c" would
be "-i"
Note the 8th parameter in the conf file is not required, but it makes it
more obvious
what is happening if a 9th parameter is also added.
Cheers,
Leif
Jim McLean wrote:
>
> Hi List,
>
> I'm trying to pass command line params to the program that is going to
> perform the stop. How can this be done?
>
>
> Here's what my config file looks like:
>
> wrapper.java.command=%JAVA_HOME%/bin/java
>
> wrapper.java.classpath.1=../lib/wrapper.jar
> wrapper.java.classpath.2=../lib/ScannedImageCopier.jar
> wrapper.java.classpath.3=../lib/jt400.jar
> wrapper.java.classpath.4=../lib/log4j-1.2.9.jar
> wrapper.java.classpath.5=../lib/mail.jar
> wrapper.java.classpath.6=../lib/activation.jar
>
> wrapper.java.library.path.1=../lib
>
> wrapper.logfile=../logs/wrapper.log
> wrapper.logfile.maxfiles=5
> wrapper.logfile.maxsize=1m
>
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp
>
> wrapper.app.parameter.1=com.farrow.imaging.ScannedImageCopier
> wrapper.app.parameter.2=1
> wrapper.app.parameter.3=start
> wrapper.app.parameter.4=com.farrow.service.ShutdownService
> wrapper.app.parameter.5=true
> wrapper.app.parameter.6=1
> wrapper.app.parameter.7=stop
>
> Much Thanks,
> Jim
>
|