|
From: Leif M. <le...@ta...> - 2006-03-01 18:14:28
|
Todd,
The problem that you are seeing is unrelated to Christian's.
Windows sends a USER_LOGGED_OUT event to all processes whenever a
user logs out. The Wrapper protects its JVM from this signal, but the
child JVM
that you launched was not being protected. The default behavior of the
JVM is
to exit when it gets this signal.
You can disable this by adding the -Xrs jvm argument when launching
the JVM.
Do not set this for the JVM controlled by the Wrapper as it will break some
features and is not needed anyway.
A better option may be to launch the second JVM as its own service
under its
own Wrapper. Depending on what you are doing though, this may not make
sense.
Be aware as well. That if the JVM launched by the Wrapper crashes, the
Wrapper will restart it. But the child JVM of the original JVM will
still be left
running. If the restarted JVM also launches a new child, you could run into
problems.
Cheers,
Leif
Todd Wilson wrote:
> This may or may not help, but we encountered an issue related to
> spawning a separate VM that may provide insight.
>
> When our app starts up it spawns a separate Java process for its
> database (resulting in two processes). We spawn the second process
> using the Ant (http://ant.apache.org/) API (which I'd recommend instead
> of using Runtime, by the way). The problem we encountered was that when
> the user that spawned our application logged out of Windows it killed
> the database (second) process; however, the original process stayed
> alive. After experimenting for a bit we finally threw our hands in the
> air and resolved it by launching the database within the same process as
> the main app, so that we only had one process.
>
> If anyone has insight into the issue I'd love to hear it. Otherwise,
> our workaround is working fine.
>
> Kind regards,
>
> Todd Wilson
>
|