0 Replies Latest reply on Aug 13, 2009 7:41 AM by Daniel Bevenius

    Subdeployments for AS 5

    Daniel Bevenius Master

      Prior to AS 5 sub-deployments in an .esb archive could be located anywhere, in the root, in a subdirectory somewhere.
      This has changed with AS 5 and this post is meant to list the options that users have when upgrading.

      This really only effects users that currently have sub-deployments in a sub-directory. For those that have sub-deployments in the root of the .esb archive nothing needs to be done.

      We are now defining a GroupStructure in deployers/esb.deployers/META-INF/esb-deployers-jboss-beans.xml:

      <bean name="GroupingStructure" class="org.jboss.soa.esb.listeners.deployers.mc.GroupingStructure">
       <property name="shortCircuitFilter">
       <inject bean="EsbFilter"/>
       </property>
       <property name="metaDataPaths">
       <array elementClass="java.lang.String">
       <value>META-INF</value>
       <value>.</value>
       </array>
       </property>
       <property name="libs">
       <set elementClass="java.lang.String">
       <value>.</value>
       <value>jars</value>
       </set>
       </property>
       <property name="libFilter">
       <inject bean="JarFilter"/>
       </property>
       <property name="groups">
       <set elementClass="java.lang.String">
       <value>.</value>
       <value>wars</value>
       </set>
       </property>
       <property name="groupFilter">
       <inject bean="WarFilter"/>
       </property>
      </bean>
      
      <bean name="EsbFilter" class="org.jboss.soa.esb.listeners.deployers.mc.util.VfsFileFilter">
       <constructor>
       <parameter>.esb</parameter>
       </constructor>
      </bean>
      
      <bean name="JarFilter" class="org.jboss.soa.esb.listeners.deployers.mc.util.VfsFileFilter">
       <constructor>
       <parameter>.jar</parameter>
       </constructor>
      </bean>
      
      <bean name="WarFilter" class="org.jboss.soa.esb.listeners.deployers.mc.util.VfsFileFilter">
       <constructor>
       <parameter>.war</parameter>
       </constructor>
      </bean>
      


      So by default we can have jars in either the root, or in a sub directory named 'jars'.
      And we can have wars in either the root, or in a sub directory named 'wars'.

      In the cases where users want to have wars (or other types of deployments) in sub-directories that have different names. they have the following options:
      1. Renaming their sub directory to 'wars'.
      2. Adding their sub directory names to the 'groups' list above.
      3. Add a META-INF/jboss-structure.xml to their .esb archive:
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <structure>
       <context>
       <path name=""/>
       <metaDataPath>
       <path name="META-INF"/>
       <path name="."/>
       </metaDataPath>
       <classpath>
       <path name=""/>
       <path name="." suffixes=".jar"/>
       </classpath>
       </context>
       <context>
       <path name="subdir/testwar.war"/>
       <metaDataPath>
       <path name="WEB-INF"/>
       </metaDataPath>
       <classpath>
       <path name="subdir/testwar.war/WEB-INF/classes"/>
       </classpath>
       </context>
      </structure>

      4. Last resort (because of the negative performance impact) activate the DirectoryStructure by uncommenting it in deployers/directory-deployer-jboss-beans.xml. It should be noted that this will effect all deployments in the server and I would think that any of the other options would be better.

      The jira for this: https://jira.jboss.org/jira/browse/JBESB-2655

      /Daniel