5 Replies Latest reply on Mar 13, 2012 10:56 AM by tepih78

    Don't understand jboss-deployment-structure.xml...

    tepih78

      Hi,

       

      I am running Jboss 7.1 for trial but come from WebSphere world.

       

      I am trying to undestand deployment structure file.

       

      I added some comments into it for discussion sake...

       

      <jboss-deployment-structure>

          <!-- as I understood, this should make classes from web module 1 see classes in web module 2 if both are in same EAR -->

          <!-- but I feel that there is no difference in setting this to true or false -->

          <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

       

          <!-- what module is afffected by settings in this section: all sub modules of EAR or what.. this is very unclear to me...->

          <deployment>

              <exclusions>

                  <!-- I want to use my own log4j configuration and had to do this to disable log4j... but It's not enough... I had to to it in each subdeployments too...

                        did I had to define this here at all then? -->

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

              </exclusions>

              <dependencies>

                  <!-- I need xerces in my app, I don't deploy myown xerces.jar in EAR so I depend on container to provide... I figured that if I add this here that

      it will be enough for all web modules to see xerces... but I think not. All subdeployments have to define this too -->

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

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

              </dependencies>

              <resources>

              </resources>

          </deployment>

       

          <sub-deployment name="A.war">

              <exclusions>

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

              </exclusions>

              <dependencies>

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

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

                  <module name="deployment.A.ear.C.war" />

              </dependencies>

          </sub-deployment>

       

          <sub-deployment name="B.war">

              <exclusions>

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

              </exclusions>

              <dependencies>

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

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

                  <module name="A.ear.A.war" />

                   <module name="A.ear.C.war" />

              </dependencies>

          </sub-deployment>

       

          <sub-deployment name="C.war">

              <exclusions>

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

              </exclusions>

              <dependencies>

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

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

              </dependencies>

          </sub-deployment>

       

      </jboss-deployment-structure>

       

       

      So, in my A.ear with the following apps:

                   A.war   (in runtime, depends on classes from C.war)

                   B.war (in runtime depends on A.war and C.war)

                   C.war

       

       

      Things do work, but I wonder if I did something extra that I didn't have to as I don't fully understand jboss-deployment-structure.xml effects...

      Any thoughts?

      Thanks!