tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: One process per webapp
Date Tue, 14 Jun 2011 18:16:41 GMT
Hash: SHA1


On 6/14/2011 9:34 AM, Pid wrote:
> On 13/06/2011 22:53, Christopher Schultz wrote:
>> What "single management interface" are you describing in your
>> enhancement comments? The Tomcat manager webapp? It's trivial to run a
>> manager in each JVM and use that for deployment.
>> If you know that your webapp needs to do things such as register a
>> shared library on startup, you can do one of two things:
>>   1. Always bounce Tomcat directly instead of re-loading the webapp
>>   2. Fix the webapp so it doesn't bomb on startup when the library
>>      is already loaded
>> Tomcat provides the manager webapp and ant tasks to access it, plus a
>> toolbox of scripts to start/stop/etc. Tomcat. Your needs seem to be
>> fairly specific... why not just roll your own solution?
> Bouncing a JVM requires admin access to the local operating system,
> which you probably wouldn't want to give to a Tomcat application.

Not necessarily... we run Tomcat unprivileged so bouncing the JVM just
requires "normal" user access. If you need port 80, use jsvc or one of
the other similar options.

Now, bouncing the JVM from withing the JVM... that requires some creativity.

It sounds like the OP could just wrap the Tomcat launcher in a script
that looks roughly like this:


while [ 1 ]
  ${CATALINA_HOME}/bin/ run >> "$CATALINA_OUT" 2>&1

This would start a Tomcat and wait for it to finish, then restart when
the original JVM came down. I suspect using JMX or whatever, one can
request a Tomcat shutdown which will ultimately terminate the JVM
(unless some foolish person launched a non-daemon thread at some point).
The script will re-start Tomcat.

This just doesn't seem like a difficult thing to implement oneself, nor
does it seem like something that is widely applicable.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message