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 could just run tomcat as a service normally? Then when/If you
> update tomcat, you could run the script to create the configuration again?
> 

Yes, I dynamically configure the apps deployed on each service restart. It
could be done differently, the way you suggest - just run a "re-configure
script" each time properties file is updated. But it'll make the maintenance
of this server a bit more involved as people will need to know what is
"re-configure script" and when it should be run. While it sounds like a
trivial thing to do (and it is, of course) in some environment it may not be
the case. 

In this specific case it is best if people maintaining the Tomcat service
will only know hot to edit the file and start/stop the service. If I add one
more step to that, someone will forget to run the script one day so I'd
better run it for them automatically on every start.

Eventually, I didn't use Tomcat capabilities to run as a service but
switched to proprietary VB.NET solution someone has developed internally,
that allows to specify batch scripts to run when the service starts up or
shuts down. 

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 "tomcat7.exe". Same could be done for "onShutdown.bat". 
-- 
View this message in context: 
http://old.nabble.com/Running-Tomcat-as-service---is-it-possible-to-make-%22tomcat7.exe%22-run-a-batch-file-each-time-it-starts--tp31081552p31089716.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to