Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-08 Thread Evgeny Goldin
awarnier wrote: > > Evgeny Goldin wrote: > .. >> >> What could probably be taken here for the Tomcat team is "onStartup.bat" >> that always runs on Tomcat's startup, regardless of how it was done - via >> "catalina.bat" or "

Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-07 Thread Evgeny Goldin
Hi Konstantin, Konstantin Kolinko wrote: > > Note, that it is possible > 1) to use some other class instead of Bootstrap, and delegate > start/stop commands to Bootstrap.main() afterwards > 2) implement a Listener and configure it in server.xml to > programmatically configure Tomcat before it s

Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-07 Thread Evgeny Goldin
Christopher Schultz-2 wrote: > >> I run Groovy to make some machine-specific replacements in some files >> according to properties file which can be configured prior to starting >> Tomcat. > > Is there any reason why this couldn't be done at /deployment/ time > instead of startup time? This see

Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-07 Thread Evgeny Goldin
Hi Chris, billybob79 wrote: > > To sum up, each time your service starts, you dynamically configure tomcat > for your environment. What do you gain by dynamically configuring tomcat > at > each startup? > > Couldn't you just script the dynamic configuration to occur once manually. > Then you

Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-07 Thread Evgeny Goldin
Mladen Turk-3 wrote: > >> I can try "--Install" service option and make service run "myBatch.bat" >> which in turn will invoke "tomcat7.exe". > > That won't work. Target executable should be %COMSPEC% with .bat file as > a parameter (%COMSPEC% /C call nyBatch.bat) > However running that requir

Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-06 Thread Evgeny Goldin
billybob79 wrote: > >> Back when it was running through "startup.bat" we put some code in > "catalina.bat" which is now ignored by "tomcat7.exe". > > What is it that you are trying to achieve? What does this "code" do? Maybe > if you explain a little more, someone might have achieved the same t

RE: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-06 Thread Evgeny Goldin
n828cl wrote: > > No; Windows services cannot run scripts. You could have a batch script > start the service, however. > You mean making service start the batch instead of "tomcat7.exe" will not work? What do you mean by saying "a batch script start the service"? Sorry, didn't follow you on

Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-06 Thread Evgeny Goldin
Evgeny Goldin wrote: > > I have Tomcat 7.0.8 successfully starting as a service on Windows machine. > Back when it was running through "startup.bat" we put some code in > "catalina.bat" which is now ignored by "tomcat7.exe". > > Are there any o

Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?

2011-03-06 Thread Evgeny Goldin
Hi, I have Tomcat 7.0.8 successfully starting as a service on Windows machine. Back when it was running through "startup.bat" we put some code in "catalina.bat" which is now ignored by "tomcat7.exe". Are there any options to make Tomcat run our batch file somehow before it is started by the serv