JBoss.org Community Documentation

Chapter 8. Introduction to specifying dependencies in EJB3 beans

Dependencies of an EJB on a service or services, including other EJBs, may be specified through the <depends> tag of the jboss.xml deployment descriptor. The <depends> tag is analagous to the @org.jboss.ejb3.annotation.Depends annotation. The dependencies control the deployment of EJBs such that an EJB will not deploy until all of it's dependencies have successfully deployed.

jboss-service.xml :

Take a look at META-INF/jboss-service.xml. This service deployment descriptor starts a service based on org.jboss.tutorial.dependency.bean.DependedOn.

   <mbean code="org.jboss.tutorial.dependency.bean.DependedOn" name="jboss.test:service=DependedOn"/>