|
From: Leif M. <lei...@ta...> - 2008-11-04 04:16:00
|
Anand, When run as a service, you are correct, the Windows Service Manager will launch the Wrapper executable as a service directly. There is no chance to run any scripts first. The Professional Edition includes a feature which enables you to execute external applications at various points in the Wrapper / Java lifecycle. This is actually much more powerful than what you are currently doing as it allows your cleanup/initialization scripts to be run each time the JVM is launched rather than once before the Wrapper is launched, thus handling the case where the JVM has been restarted for some reason. This is done in the Professional Edition using the following properties in your Wrapper.conf: --- wrapper.event.jvm_prelaunch.command.argv.1=c:¥myapp¥bin¥myinit.bat wrapper.event.jvm_prelaunch.command.argv.2=arg1 wrapper.event.jvm_prelaunch.command.block=TRUE --- I would be happy to generate a 1 month trial license for you to experiment with. To do so, please register with our site: http://wrapper.tanukisoftware.org/doc/english/register.do then send me a note at sa...@ta... Let me know if you have any questions, Sincerely, Leif Mortenson Tanuki Software, Ltd. On Tue, Nov 4, 2008 at 3:35 AM, Anand HS <an...@gm...> wrote: > Hello, > I am new to Java Service Wrapper. > I got to work with the console based start up easily. > However, my project has a few pre-startup configurations that need to be run > before the service starts. We include all these configurations in a couple > of windows batch files. > So, when running JSW through console, I call these batch scripts in > MyApp.bat before calling the wrapper service itself. > However, When I run JSW as a windows service, I believe it is not executing > MyApp.bat rather starting from wrapper.conf directly. ? > > My question is - how do i run other batch files before I run JSW specific > configuration when running it as a windows service. ? > > Any help regarding tweaks/other approaches would be highly appreciated. > > -Thanks, > Anand -- Leif Mortenson President Tanuki Software, Ltd. 6-16-7-1001 Nishi-Kasai, Edogawa-ku Tokyo 134-0088 Japan Tel/Fax: +81-3-3878-0415 http://www.tanukisoftware.com lei...@ta... |