5 Replies Latest reply on Mar 7, 2012 3:58 AM by Savvas Triantafyllou

    JBoss AS 7.1.0.CR1 Initialization order of EAR's modules problem

    Savvas Triantafyllou Newbie



      I am deploying an ear in Jboss AS 7.1.0.CR1 which contains a spring module (astroboa-engine.spring) and an EJB module (astroboa-ejb3.jar) and I would like

      them to be initialized in the order they are mentioned.


      I have specified initialize-in-order parameter to be "true" in the application.xml


      <?xml version="1.0" encoding="UTF-8"?>

      <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">

        <description>This modules is responsible to generate Astroboa EAR</description>












      I have also specified the module-order parameter in jboss-app.xml


      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jboss-app PUBLIC

              "-//JBoss//DTD Java EE Application 5.0//EN"






      and finally I have even provided a jboss-deployment-structure.xml file where I declare that the EJB module depends on

      the spring module.




        <!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->


        <sub-deployment name="astroboa-engine.spring">


              <module name="org.apache.xerces" />



        <sub-deployment name="astroboa-ejb3.jar">


                   <module name="deployment.astroboa.ear.astroboa-engine.spring" />






      JBoss AS seems to ignore all the above and deploys the two modules at the same time. 

      I have been searching for something similar without any luck.


      I have only come across with the issue https://issues.jboss.org/browse/AS7-3078 and

      I have looked at the application.xml of the test case for this issue where the ear consists of a war and an ejb module. Since this issue has been

      resolved and the test case is very similar to my case, I believe that there is something wrong with the initialization order when it comes

      for spring modules.


      Any hint would be appreciated!