Red Hat JBoss Fuse

Deploying into the Container

Getting application packages into the container

Red Hat

Version 6.1

Legal Notice

Trademark Disclaimer

The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Apache, ServiceMix, Camel, CXF, and ActiveMQ are trademarks of Apache Software Foundation. Any other names contained herein may be trademarks of their respective owners.

Legal Notice

Third Party Acknowledgements

One or more products in the Red Hat JBoss Fuse release includes third party components covered by licenses that require that the following documentation notices be provided:
  • JLine (http://jline.sourceforge.net) jline:jline:jar:1.0
    License: BSD (LICENSE.txt) - Copyright (c) 2002-2006, Marc Prud'hommeaux
    All rights reserved.
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    • Neither the name of JLine nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Stax2 API (http://woodstox.codehaus.org/StAX2) org.codehaus.woodstox:stax2-api:jar:3.1.1
    Copyright (c) <YEAR>, <OWNER> All rights reserved.
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • jibx-run - JiBX runtime (http://www.jibx.org/main-reactor/jibx-run) org.jibx:jibx-run:bundle:1.2.3
    License: BSD (http://jibx.sourceforge.net/jibx-license.html) Copyright (c) 2003-2010, Dennis M. Sosnoski.
    All rights reserved.
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    • Neither the name of JiBX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • JavaAssist (http://www.jboss.org/javassist) org.jboss.javassist:com.springsource.javassist:jar:3.9.0.GA:compile
  • HAPI-OSGI-Base Module (http://hl7api.sourceforge.net/hapi-osgi-base/) ca.uhn.hapi:hapi-osgi-base:bundle:1.2
    License: Mozilla Public License 1.1 (http://www.mozilla.org/MPL/MPL-1.1.txt)
30 Jan 2015

Abstract

The guide describes the options for deploying applications into a Red Hat JBoss Fuse container.
I. The Red Hat JBoss Fuse Container
1. Red Hat JBoss Fuse Overview
1.1. Red Hat JBoss Fuse Container Architecture
1.2. Deployment Models
1.3. Dependency Injection Frameworks
1.4. Synchronous Communication
1.5. Asynchronous Communication
1.6. Fuse Fabric
2. Dependency Injection Frameworks
2.1. Spring and Blueprint Frameworks
2.2. Hot Deployment
2.3. Using OSGi Configuration Properties
3. Building with Maven
3.1. Maven Directory Structure
3.2. Preparing to use Maven
4. Locating Dependencies
4.1. Understanding Where Red Hat JBoss Fuse Bundles are Stored
4.2. Locating Maven Artifacts at Build Time
4.3. Locating Maven Artifacts at Run Time
4.4. Locating Artifacts in a Fabric
4.5. Generating a Custom Offline Repository
II. OSGi Bundle Deployment Model
5. Introduction to OSGi
5.1. Red Hat JBoss Fuse
5.2. OSGi Framework
5.3. OSGi Services
5.4. OSGi Bundles
6. Building an OSGi Bundle
6.1. Generating a Bundle Project
6.2. Modifying an Existing Maven Project
6.3. Packaging a Web Service in a Bundle
6.4. Configuring the Bundle Plug-In
7. Deploying an OSGi Bundle
7.1. Hot Deployment
7.2. Manual Deployment
7.3. Lifecycle Management
7.4. Troubleshooting Dependencies
8. Deploying Features
8.1. Creating a Feature
8.2. Deploying a Feature
9. Deploying a Plain JAR
9.1. Bundle Tool (Bnd)
9.2. Converting a JAR Using Bnd
9.3. Converting a JAR Using the wrap Scheme
10. OSGi Bundle Tutorials
10.1. Generating and Running an EIP Bundle
10.2. Generating and Running a Web Services Bundle
III. The Fuse Application Bundle Deployment Model
11. Building a FAB
11.1. Generating a FAB Project
11.2. Class Sharing
11.3. Modifying an Existing Maven Project
11.4. Configuring a FAB
12. Deploying a FAB
12.1. The FAB Deployment Model
12.2. FABs and Features
12.3. Hot Deployment
12.4. Manual Deployment
12.5. Configuring Maven for FAB
13. FAB Tutorial
13.1. Generating and Running an EIP FAB
IV. WAR Deployment Model
14. Building a WAR
14.1. Modifying an Existing Maven Project
14.2. Bootstrapping a CXF Servlet in a WAR
14.3. Bootstrapping a Spring Context in a WAR
15. Deploying a WAR
15.1. Converting the WAR Using the war Scheme
15.2. Configuring the Web Container
V. OSGi Service Layer
16. OSGi Services
16.1. The Blueprint Container
16.1.1. Blueprint Configuration
16.1.2. Defining a Service Bean
16.1.3. Exporting a Service
16.1.4. Importing a Service
16.2. Publishing an OSGi Service
16.3. Accessing an OSGi Service
16.4. Integration with Apache Camel
VI. Asynchronous Communication
17. JMS Broker
17.1. Working with the Default Broker
17.2. JMS Endpoints in a Router Application
18. Inter-Bundle Communication with the NMR
18.1. Architecture of the NMR
18.2. The Apache Camel NMR Component
A. URL Handlers
A.1. File URL Handler
A.2. HTTP URL Handler
A.3. Mvn URL Handler
A.4. Wrap URL Handler
A.5. War URL Handler
B. OSGi Best Practices
B.1. OSGi Tooling
B.2. Building OSGi Bundles
B.3. Sample POM File
C. Pax-Exam Testing Framework
C.1. Introduction to Pax-Exam
C.2. Sample Pax-Exam Test Class
Index