|
From: Leif M. <le...@ta...> - 2004-03-18 08:18:52
|
Luis,
Could you post the debug output from a run of one of these "script"
applications?
The Wrapper is designed so that when all non-daemon threads
complete, it will
automatically call WrapperManager.stop. This should then cause the JVM
to exit
along with the Wrapper giving you the behavior that you want. (This is
covered in
one of my pre-release tests. Just retested it and it is working)
You will get the same effect if your application calls System.exit
on completion.
That will trigger the Wrapper's shutdown hook which will in turn call
WrapperManager.stop.
If you have disabled the shutdown hook or are running a 1.2.x
version of Java then
the shutdown hook will never be run. This means that
WrapperManager.stop will
never be called. To the Wrapper, the JVM will appear to have exited
unexpectedly
and will be restarted. This may be what is happening to you.
By default, if the JVM exits unexpectedly or is restarted for any
reason then the
Wrapper will allow up to 5 restarts within a set period of time. The
time period
and the max restart count can be controlled using the following
properties. You
should not need to touch them in this case however.
wrapper.max_failed_invocations
wrapper.successful_invocation_time
Be sure to read over their documentation before playing with them.
Cheers,
Leif
Luis Guzman wrote:
>Hi,
>I'm wondering if there is a way to limit the Wrapper to run only one
>instance of a JVM whether or not the startup was successful. Primarily,
>I'm trying to set a configuration file for scripts that are to run only
>once when invoked. The wrapper will set the settings which will launch
>the script, and once it finishes, The JVM is closed. The wrapper sees
>the JVM shutdown and then restart the whole script process again. I
>can't set an exteded startup time since some of these scripts can
>actually run for a mere 10 seconds or hours.
>
>If anyone has had this situation and a remedy, please let me know.
>
>Regards
>Luis
>
>
|