2 Replies Latest reply on Dec 7, 2012 9:38 PM by chandra sekaran

    Understanding configuration files better on JBoss AS 7 (standalone.xml and jboss-deployment-structure.xml)

    chandra sekaran Newbie

      Hi All,

       

      Could you please clarify me on the following with regards to configuration files standalone.xml, module.xml and jboss-deployment-structure.xml.

       

      Firstly I need to understand various module.xml and its relationship to jboss-deployment-structure.xml,standalone.xml, (any blog or post would suffice).

       

      Questions on jboss-deployment-structure.xml

      1. If I need to add all META-INF/lib/jars in jboss-deployment-structure.xml how would I do it ( say more than 100 jars). I did it by the following way, should I modify it?

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

      <deployment>

      <module>

      ..

      ..

      <resources>     

         <!-- <resource-root path="my-library.jar" /> -->

         <resource-root path="activation.jar      "/>

      <resource-root path="ant.jar      "/>

      <resource-root path="antlr.jar      "/>

      <resource-root path="axis.jar      "/>

      <resource-root path="axis-ant.jar     "/>

      .. upto 100 jars

      </resources>

      </deployment>

      </jboss-deployment-structure>

       

      2.Is there any specific order  to place the modules or I can follow any order, how does JBoss AS pick up these modules. I have placed the modules like this

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

      <deployment>

      <module>

           <module name="com.liferay.portal"/>

          <module name="com.liferay.util"/>

         <module name="javax.mail.api" />  

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

         <module name="org.jboss.modules" />        

         <module name="org.jboss.ironjacamar.jdbcadapters"/>   

      <module name="org.osgi.core"/>   

      <module name="org.jboss.osgi.framework"/>  

      <module name="org.slf4j" export="true" />

      <imports>           --------------------------------- Is the import here can be done this way? what is the impact adding it here

      <include path="com/sun/jmx"/>        

      <exclude path="/**" />           

      </imports>         

      </module>  

        <module name="javax.activation.api" />

        <module name="javax.ejb.api" />

        <module name="javax.mail.api" /> --------------- If I add multiple times (like this) what is the impact?

        <module name="javax.servlet.api" />

        <module name="javax.servlet.jsp.api" />

        <module name="org.apache.commons.collections" />

        <module name="org.apache.commons.lang" />

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

        <module name="org.dom4j" />

        <module name="org.jdom" />

        <module name="org.slf4j.jcl-over-slf4j" /> -- I have placed more than one type of this module

        <module name="system" />

      </module>

      </deployment>

      </jboss-deployment-structure>

       

      3. Is it right to add the following, what would be the impact? referring to sub-deployment is it right to add here, is the name  

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

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

      </resources>

      </deployment>

      <sub-deployment name="deployment.<myapp.ear>.portal-web-complete.war"></sub-deployment>

            <sub-deployment name="deployment.<myapp.ear>.tunnel-web.war"></sub-deployment>

            <sub-deployment name="deployment.<myapp.ear>.cache-ejb.jar"></sub-deployment>

            <sub-deployment name="deployment.<myapp.ear>.counter-ejb.jar"></sub-deployment>

            <sub-deployment name="deployment.<myapp.ear>.documentlibrary-ejb.jar"></sub-deployment>

            <sub-deployment name="deployment.<myapp.ear>.mail-ejb.jar"> </sub-deployment>

            <sub-deployment name="deployment.<myapp.ear>.portal-ejb.jar"> </sub-deployment>

      </jboss-deployment-structure>

      3. I have a tattletale report which I have posted in another post (https://community.jboss.org/message/780281#780281), how can i use this report in jboss-deployemtn-strcuture.xml for resolving dependency issues and CNFE(Class Not Found)


      I have added my jboss-deployment-structure.xml in the attachment, please notify me if any corrections to be made

       

       

      Questions on standalone.xml

      1. Is there any relation with jboss-deployment-structure.xml, should I add in standalone.xml whenever I make change in jboss-deployment-strcuture.xml
      2.In the past to resolve some issues I added the following in order to resolve new missing dependencies

      <subsystem xmlns="urn:jboss:domain:ee:1.0">

                  <global-modules>

        <module name="com.h2database.h2"/>

        <module name="com.ibm.db2"/>

        <module name="com.liferay.portal"/>

        <module name="org.hornetq"/>

        <module name="org.hornetq.ra"/>

        <module name="javax.jms.api"/>

        <module name="org.jboss.as.ee"/>

        <module name="org.jboss.as.jpa"/>

      </global-modules>

      </subsystem>

      So how to identify the subsystem for resolving any dependency issue. There are number of subsytems like
      <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
      <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
      <subsystem xmlns="urn:jboss:domain:logging:1.1">

      Can we add our own susbsytem or use the ones provided by JBoss  AS 7
        

       

      I referred to several forums and blogs but I couldnt understand the complete functionality. It would be fine if anybody explain (or post blogs, reference links) which file and how it is used by JBoss AS 7 while deploying, Is there any way to (debug or log) understand to see how JBoss AS picks these files.

       

      This would really help me to work on migrate my application from Jboss 3 to Jboss 7