Glassfish 3.1.2 on a Windows 7 with JDK7 latest, configured as a Windows service.
-Xrs flag is set in domain.xml.
When I stop GF service from Services tool I can see a clean shutdown in server.log
[#|2014-07-09T10:09:19.878+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=195;_ThreadName=Thread-2;|Chiusura del server iniziata|#]
[#|2014-07-09T10:09:22.109+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=195;_ThreadName=Thread-2;|[TimerBeanContainer] Shutdown() called....|#]
[#|2014-07-09T10:09:22.109+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=195;_ThreadName=Thread-2;|EJB5122:EJB Timer Service shutdown at [2014/07/09 10:09:22]|#]
[#|2014-07-09T10:09:22.109+0200|INFO|oracle-glassfish3.1.2|org.eclipse.persistence.session.file:.../applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App|_ThreadID=195;_ThreadName=Thread-2;|file:/.../applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App logout successful|#]
[#|2014-07-09T10:09:22.156+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=247;_ThreadName=Thread-2;|RAR7094: __cp_jdbc_ra shutdown successful.|#]
[#|2014-07-09T10:09:22.156+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=249;_ThreadName=Thread-2;|RAR7094: __xa_jdbc_ra shutdown successful.|#]
[#|2014-07-09T10:09:22.156+0200|INFO|oracle-glassfish3.1.2|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=250;_ThreadName=Thread-2;|MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter stopping...|#]
[#|2014-07-09T10:09:25.775+0200|INFO|oracle-glassfish3.1.2|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=250;_ThreadName=Thread-2;|MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter stopped.|#]
[#|2014-07-09T10:09:25.775+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=248;_ThreadName=Thread-2;|RAR7094: jmsra shutdown successful.|#]
[#|2014-07-09T10:09:30.549+0200|INFO|oracle-glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=195;_ThreadName=Thread-2;|Procedura di chiusura completata|#]
When the PC shuts down, however, I see none of the above and the event viewer shows a Warning for an abrupt termination
Child process [6300 - C:/Programs/GlassfishV3/glassfish/bin/asadmin.bat start-domain --verbose --domaindir C:\\Programs\\GlassfishV3\\glassfish\\domains trunk ] terminated with 143
Is Windows not calling stop on each active service on shutdown ?
Is it a bug of the GlassfishSvc tool used to create the service ?