Hi,
I am trying to make a service mbean depend on a singleton stateless session
bean by configuring in *jboss-service.xml *using *<depends> *in *wildfly AS
8 *but getting the below error:
*ERROR [org.jboss.as.controller.management-operation] (Controller Boot
Thread) JBAS014613: Operation ("deploy") failed - address:
([("deployment"
=> "TestEAR.ear")]) - failure description: {"JBAS014771: Services with
missing/unavailable dependencies" =>
["jboss.mbean.service.TestService.start is missing
[jboss.mbean.service.\"jboss.j2ee:ear=TestEAR.ear,jar=module-A.jar,name=TestConfig,service=EJB3\".start]","jboss.mbean.service.TestService.create
is missing
[jboss.mbean.service.\"jboss.j2ee:ear=TestEAR.ear,jar=module-A.jar,name=TestConfig,service=EJB3\".create]"*
Please find below the details on the code employed: Please help me to
resolve the error. Many thanks.
*project structure*
TestEAR (ear)
--- module-A (ejb jar containing singleton stateless session bean)
--- module-B (jar containing service mbean)
--- meta-inf/jboss-service.xml
*singleton stateless session bean (under module-A JAR)*
@Local(TestLocal.class)
@Resource(name="TestConfig", mappedName="java:/ConnectionFactory")
public class TestConfig {
... code ...
}
*jboss-service.xml (under meta-inf folder in TestEAR.ear)*
<server>
<mbean code="com.test.TestService" name="TestService">
<depends>jboss.j2ee:ear=TestEAR.ear,jar=module-A.jar,name=TestConfig,service=EJB3</depends>
</mbean>
*TestService.java (MBean) (under module-B JAR)*
public class TestService extends ServiceMBeanSupport implements TestMBean {
protected void startService() throws Exception {
...code...
}
protected void stopService() throws Exception {
...code...
}
protected void createService() throws Exception {
...code...
}
protected void destroyService() throws Exception {
...code...
}
}
*TestMBean.java (MBean interface) (under module-B JAR)*
public interface TestMBean extends org.jboss.system.ServiceMBean { }
Thanks.
Sridhar Thiyagarajan
Show replies by date