Red Hat Training

A Red Hat training course is available for Red Hat JBoss Enterprise Application Platform

3.5. Exclude a Subsystem from a Deployment


This topic covers the steps required to exclude a subsystem from a deployment. This is done by editing the jboss-deployment-structure.xml configuration file. Excluding a subsystem provides the same effect as removing the subsystem, but it applies only to a single deployment.

Procedure 3.6. Exclude a Subsystem

  1. Open the jboss-deployment-structure.xml file in a text editor.
  2. Add the following XML inside the <deployment> tags:
      <subsystem name="SUBSYSTEM_NAME" />
  3. Save the jboss-deployment-structure.xml file.

The subsystem has been successfully excluded. The subsystem's deployment unit processors will no longer run on the deployment.

Example 3.6. Example jboss-deployment-structure.xml file.

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
      <subsystem name="jaxrs" />
      <module name="org.javassist" />
      <module name="deployment.javassist.proxy" />
      <module name="deployment.myjavassist" />
      <module name="myservicemodule" services="import"/>
      <resource-root path="my-library.jar" />
  <sub-deployment name="myapp.war">
      <module name="deployment.myear.ear.myejbjar.jar" />
    <local-last value="true" />
  <module name="deployment.myjavassist" >
     <resource-root path="javassist.jar" >
         <exclude path="javassist/util/proxy" />
  <module name="deployment.javassist.proxy" >
      <module name="org.javassist" >
          <include path="javassist/util/proxy" />
          <exclude path="/**" />