Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-957

Wildfly not respecting subdeployment dependency order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • None
    • None
    • Server
    • None
    • Hide

      Load the attached EAR in wildfly (or build from the attached source).
      Wildfly does not load the modules in the order webapp-one -> webapp-two -> webapp-three. Instead, you may see something like:

      11:27:31,046 INFO  MSC service thread 1-1 [deployment] JBAS015973: Starting subdeployment (runtime-name: "webapp-two-1.0-SNAPSHOT.war")
      11:27:31,046 INFO  MSC service thread 1-1 [deployment] JBAS015973: Starting subdeployment (runtime-name: "webapp-three-1.0-SNAPSHOT.war")
      11:27:31,047 INFO  MSC service thread 1-1 [deployment] JBAS015973: Starting subdeployment (runtime-name: "webapp-one-1.0-SNAPSHOT.war")
      
      Show
      Load the attached EAR in wildfly (or build from the attached source). Wildfly does not load the modules in the order webapp-one -> webapp-two -> webapp-three . Instead, you may see something like: 11:27:31,046 INFO MSC service thread 1-1 [deployment] JBAS015973: Starting subdeployment (runtime-name: "webapp-two-1.0-SNAPSHOT.war" ) 11:27:31,046 INFO MSC service thread 1-1 [deployment] JBAS015973: Starting subdeployment (runtime-name: "webapp-three-1.0-SNAPSHOT.war" ) 11:27:31,047 INFO MSC service thread 1-1 [deployment] JBAS015973: Starting subdeployment (runtime-name: "webapp-one-1.0-SNAPSHOT.war" )

      When loading an EAR with initialize-in-order set to true within the application.xml and subdeployment dependencies defined in{{jboss-deployment-structure.xml}}, Wildfly does not load the EAR modules in order as specified nor as defined by the dependencies.

      I have attached both a source repository and the generated EAR. The application.xml and jboss-deployment-structure.xml are as below:

      <?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">
        <display-name>ear</display-name>
        <initialize-in-order>true</initialize-in-order>
        <module>
          <web>
            <web-uri>webapp-one-1.0-SNAPSHOT.war</web-uri>
            <context-root>/one</context-root>
          </web>
        </module>
        <module>
          <web>
            <web-uri>webapp-two-1.0-SNAPSHOT.war</web-uri>
            <context-root>/two</context-root>
          </web>
        </module>
        <module>
          <web>
            <web-uri>webapp-three-1.0-SNAPSHOT.war</web-uri>
            <context-root>/three</context-root>
          </web>
        </module>
      </application>
      
      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
          <sub-deployment name="webapp-one-1.0-SNAPSHOT.war">
          </sub-deployment>
          <sub-deployment name="webapp-two-1.0-SNAPSHOT.war">
              <dependencies>
                  <module name="deployment.wildfly-deployment-order.ear.webapp-one-1.0-SNAPSHOT.war" />
              </dependencies>
          </sub-deployment>
          <sub-deployment name="webapp-three-1.0-SNAPSHOT.war">
              <dependencies>
                  <module name="deployment.wildfly-deployment-order.ear.webapp-two-1.0-SNAPSHOT.war" />
              </dependencies>
          </sub-deployment>
      </jboss-deployment-structure>
      

            kathermanova Katarína Hermanová
            briehman_jira Brian Riehman (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: