What mechanism are you using to run JBoss AS as a serivice? There are several mechanisms mentioned here:
https://community.jboss.org/wiki/RunJBossAsAServiceOnWindows
Most likely culprits:
a) If using a script mechanism, the script is calling Windows shutdown
b) If using a configurable mechanism (e.g. Java Service Wrapper), the configuration is set such that Windows is shut down