> Given an application started through srvany, why would it 'care' if an
> active user session ended?
[quoted text clipped - 11 lines]
>
> --Dale--
Taken from srvany.wri
---------------------------
For WIN32 graphical applications: when the currently logged-in user is
logging-off, all WIN32 top-level windows receive WM_QUERYENDSESSION and
WM_ENDSESSION messages. Some WIN32 applications choose to terminate upon
receipt of such messages. In order for your WIN32 application to survive
logoff, it must not do that: instead, your windows procedure should call
the default windows procedure on these messages.
For WIN32 Console (i.e. character-mode) applications: when the currently
logged-in user is logging-off, all Console applications receive a
CTRL_LOGOFF_EVENT event from the Console.
If your Console application has registered a Console event handler (via
SetConsoleCtrlHandler), it must ignore CTRL_LOGOFF_EVENT in order to
survive the logoff.
Dale - 23 Feb 2004 14:57 GMT
> > Given an application started through srvany, why would it 'care' if an
> > active user session ended?
> Taken from srvany.wri
> ---------------------------
> For WIN32 Console (i.e. character-mode) applications: when the currently
> logged-in user is logging-off, all Console applications receive a
> CTRL_LOGOFF_EVENT event from the Console.
> If your Console application has registered a Console event handler (via
> SetConsoleCtrlHandler), it must ignore CTRL_LOGOFF_EVENT in order to
> survive the logoff.
David, Thanks for the reply to someone who clearly should have RTFM.
Based on your insight, I think now that the solution will almost
certainly be run "javaw" instead of "java" to start the web server.
The former does not provide a console window.
Thanks again.
--Dale--
Dale - 23 Feb 2004 15:48 GMT
> > Given an application started through srvany, why would it 'care' if an
> > active user session ended?
> Taken from srvany.wri
> ---------------------------
> For WIN32 Console (i.e. character-mode) applications: when the currently
> logged-in user is logging-off, all Console applications receive a
> CTRL_LOGOFF_EVENT event from the Console.
> If your Console application has registered a Console event handler (via
> SetConsoleCtrlHandler), it must ignore CTRL_LOGOFF_EVENT in order to
> survive the logoff.
In case someone else comes across this later, let me say that my
earlier suggestion that "javaw.exe" instead of "java.exe" would keep
the process alive through a logoff was incorrect.
The key is to add a parameter "-Xrs" to the java parameter list.
Type "java -X" for disclaimers (apparently this set of "X" parameters
is subject to change without warning). But it seems to work, so I'm
good.
--Dale--