How to control the initialization order of an EAR's subdeployments / modules in JBoss Enterprise Application 6

Solution Verified - Updated -

Issue

  • How to control the initialization order of an EAR's subdeployments / modules in JBoss EAP 6?
  • Is there a way to maintain the deployment order mentioned in the application.xml file in JBoss EAP 6?
  • While trying to deploy 2 ejb jars in one EAR on JBoss EAP 6 following kind of exception is observed. Where the EJB jar1 is dependent on EJB jar2.
16:19:26,326 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"EAR_1.ear\".\"EJBOne.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"EAR_1.ear\".\"EJBOne.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment \"EJBOne.jar\" of deployment \"EAR_1.ear\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014183: Bean class test.ejb.one.TestClass specifies @Local annotation, but does not implement 1 interface"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.EAR_1.testEJBTwo.FormatMapperSE.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_1.testEJBTwo.FormatMapperSE]","jboss.naming.context.java.comp.EAR_1.common.ejb.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_1.testEJBTwo.OnlineRequestSI]","jboss.naming.context.java.comp.EAR_1.testEJBTwo.TestBranch.ValidatorFactory Missing[jboss.naming.context.java.comp.EAR_1.testEJBTwo.TestBranch]","jboss.deployment.subunit.\"EAR_1.ear\".\"TestWebApp.war\".INSTALL 
  • The same application worked when all the EJB jar1 and EJB jar2 contains are merged into one JAR and then placed inside an EAR.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.