Quantcast

Passing command line parms with WrapperStartStopApp

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Passing command line parms with WrapperStartStopApp

Jim McLean

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
**********************************************************************
This electronic message contains information from Russell A. Farrow Limited, Russell A. Farrow (U.S.) Inc., canadaplus.com or RAF Express Inc. that may be confidential or privileged. The information in this electronic message is only for the use of the intended recipient. Inappropriate disclosure, copying, distribution or other use of the contents of this electronic message is strictly prohibited. If you have received this electronic transmission in error, please notify the sender immediately by return e-mail. Thank you. *********************************************************************** ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Wrapper-user mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wrapper-user

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Passing command line parms with WrapperStartStopApp

Leif Mortenson-2
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
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Passing command line parms with WrapperStartStopApp

Jim McLean

Thanks, I'll try that out.

Jim McLean

Inactive hide details for Leif Mortenson <leif@tanukisoftware.com>Leif Mortenson <[hidden email]>



To

[hidden email]

cc


Subject

Re: [Wrapper-user] Passing command line parms with WrapperStartStopApp

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
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user


pic04495.gif (1K) Download Attachment
Loading...