tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50890] Provide "onStartup" and "onShutdown" scripts that run on every scenario Tomcat starts up or shuts down
Date Tue, 08 Mar 2011 20:51:05 GMT

--- Comment #1 from Konstantin Kolinko <> 2011-03-08 15:51:01
EST ---
(In reply to comment #0)

1) The service wrapper used by Tomcat is not a part of Tomcat project. We are
using the one provided by the Daemon project of Apache Commons (jsvc on Unix,
procrun on Windows). This enhancement proposal should be reported there,

2) Tomcat, per se, has support for LifecycleListener classes in various places
of its configuration.

Implementing a listener that calls an external program should not be hard
(though has its tricks, see CGIServlet for an example).

Calling a script file (through JSR 223 support for scripting languages) might
be even more easier.

I suppose that this is a rare requirement though.

> "onStartup.bat/sh" and "onShutdown.bat/sh"

I should note, that there are time limits on shutdown process, and there might
be different reasons why Tomcat shuts down. I would not expect that calling
anything external during shutdown would work reliably.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message