이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 18. Extensions


An extension is a module that extends the core capabilities of JBoss EAP.
You can extend SwitchYard functionality by creating extension modules for JBoss EAP. Use this feature to:
  • Support additional binding types through Camel components not included in the distribution.
  • Add data formats and other Camel libraries for use within Camel routing services.
  • Implement custom gateway bindings as Camel components.

18.1. Create SwitchYard Extension Module in JBoss EAP

Procedure 18.1. Create, Register and Build a SwitchYard Extension Module in JBoss EAP

  1. An extension is deployed in the modules folder of JBoss EAP.
    Extension modules are placed under the modules/system/layers/soa/org/ directory of your JBoss EAP installation. The jar files that make up the module are placed in the modules/system/layers/soa/org/product/subsystem/modulename/main directory. The module.xml file contains definition information. For example, in directory modules/system/layers/soa/org/apache/camel/saxon/main, the module.xml file looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
     <module xmlns="urn:jboss:module:1.0" name="org.apache.camel.saxon">
    
        <resources>
            <resource-root path="camel-saxon-2.10.0.redhat-60024.jar"/>
            <resource-root path="saxon9he-9.3.0.11.jar"/>
        </resources>
    
        <dependencies>
            <module name="javax.api"/>
            <module name="org.slf4j"/>
            <module name="org.apache.camel.core"/>
        </dependencies>
    
    </module>
    
    Copy to Clipboard Toggle word wrap
    The module.xml file contains the following information:
    • The module name. The module name is comprised of the directory names for the module underneath the EAP-Home/modules/system/layers/soa directory.
    • Resources required. Notice that the files mentioned in the <resources> section are in the same directory as the module.xml file.
    • Dependencies for the module.
  2. In order to make SwitchYard aware of the extension module, add the module name to the list of extensions defined in the SwitchYard subsystem in standalone.xml:
    <subsystem xmlns="urn:jboss:domain:switchyard:1.0">
      <modules>
        <module identifier="org.switchyard.component.bean" implClass="org.switchyard.component.bean.deploy.BeanComponent"/>
        <module identifier="org.switchyard.component.soap" implClass="org.switchyard.component.soap.deploy.SOAPComponent">
        <!-- snip -->
      </modules>
      <extensions>
        <extension identifier="org.apache.camel.mvel"/>
        <extension identifier="org.apache.camel.ognl"/>
        <extension identifier="org.apache.camel.jaxb"/>
        <extension identifier="org.apache.camel.soap"/>
        <extension identifier="org.apache.camel.saxon"/>
      </extensions>
    </subsystem>
    
    Copy to Clipboard Toggle word wrap
  3. Build the application that will be using the module using the mvn clean install command. If there are problems running the JVM tests step locally, use the -DskipTests argument.
    Update the pom.xml file for the application. Add the module as a dependency and mark it as provided.
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-saxon</artifactId>
        <version>2.10.0.redhat-60024</version>
        <scope>provided</scope>
    </dependency>
    
    Copy to Clipboard Toggle word wrap
  4. If the module is created from a jar not supplied with JBoss Fuse Service Works, you must ensure that a jboss-deployment-structure.xml file exists in the application-name/src/main/resources/META-INF folder of the application that will run it. The jboss-deployment-structure.xml file contains information in the following format:
    <?xml version="1.0" encoding="UTF-8"?>  
    <jboss-deployment-structure>  
        <deployment>  
            <dependencies>  
                <module name="org.apache.camel.saxon" services="import" export="true">  
                    <imports>  
                        <include path="META-INF/services/org/apache/camel/component" />  
                        <include path="META-INF/services/org/apache/camel/language" />  
                    </imports>  
                    <exports>  
                        <include path="META-INF/services/org/apache/camel/component" />  
                        <include path="META-INF/services/org/apache/camel/language" />  
                    </exports>  
                </module>  
            </dependencies>  
        </deployment>  
    </jboss-deployment-structure>
    
    Copy to Clipboard Toggle word wrap
    The module name must be the same as the module name defined in step 1 with the same naming rules.
For an example of an extension module and an application, see https://access.redhat.com/solutions/653823.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat