Java – GlassFish service stop when the console is logged out

glassfishjavaservicewindows-server-2003

I run a GlassFish server on a Win2k3 machine. If I do a remote desktop login to the console ("mstsc /console") and I log out, the application exits (the server does not shut down, the JVM is simply killed). The wrapper still runs however.

I tried adding the "-Xrs" flag to my "domain.xml" file as described here to no success.

Any suggestions?

Best Answer

This helped me solve a very similar problem. It is probably exactly what you want: http://wiki.glassfish.java.net/Wiki.jsp?page=FaqRunAsWindowsService