You can make a JMX call, possibly looking for the Server MBean, and if that is available and has a status of running, then JBoss AS is running.
These should help: http://community.jboss.org/wiki/StartupAndDeploymentCheck, http://community.jboss.org/wiki/HowDoIGetRemoteAccessToMyMBean