I fixed it like this:
--------------------------------------------------------------------------
1. create a JNI util dll for windows with one call:
BOOL WINAPI ConsoleCtrlHandler(DWORD dwCtrlType)
{
if (dwCtrlType == CTRL_LOGOFF_EVENT)
return TRUE; // ignore this signal and don't pass it on
return FALSE; // pass it on
}
JNIEXPORT void JNICALL Java_xxx_setConsoleCtrlHandler(JNIEnv *env, jclass jcl)
{
SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE);
return;
}
--------------------------------------------------------------------------
2. load this native library in my app's init()
2.a System.loadLibrary(name);
to do this: add -Djava.library.path option to your startup
2.b set the handler using the JNI call:
FOO.jniSetConsoleCtrlHandler();
--------------------------------------------------------------------------
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030248#4030248
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030248
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user