[jboss-user] [Installation, Configuration & Deployment] - Re: JBoss 4.0.5 Appserver running as a service shutsdown

vamsin do-not-reply at jboss.com
Thu Mar 15 16:38:30 EDT 2007


It is a windows service. It shows up in the Services Panel. 
I can start and I can stop. This service like I said, has a start command. 
In my WindowsService Installer (c++ exe) program (much similar to JavaService.exe), I have a startProcess() which calls CreateProcess(...) to launch the "exe".  This startProcess()'s handle is added to 
void WINAPI ServiceMain(DWORD argc, LPSTR *argv)
{
   gHandle= RegisterServiceCtrlHandlerA(g_szSvcName, SvcCtrlHandler);
   startProcess(); // uses createProcess() to start an exe
}
where SvcCtrlHandler() listens to the following:
        SERVICE_CONTROL_SHUTDOWN and 
        SERVICE_CONTROL_STOP
        to handle stopService
This is probably what JavaService.exe does. 


My **only** problem is when the user logs off the machine, the child process of my service: "myfoo.exe" exits, because it'sJVM received CTRL_LOGOFF_EVENT or an equivalent Signal from the OS that the JVM, started by JBoss, is registered to handle.

Vamsi

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028535#4028535

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028535



More information about the jboss-user mailing list