I'm trying to deploy a WebApp inside a SAR file and want to make the web app dependent on a service in the SAR file, so here's the directory sturcture of the SAR:
META-INF/jboss-service.xml com/test/TestService.class TestWebApp.war/ WEB-INF/web.xml WEB-INF/jboss-web.xml index.jsp
<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="com.test.TestService" name="com.test:service=TestService"> </mbean> </server>
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd"> <jboss-web> <depends>com.test:service=TestService</depends> </jboss-web>