Red Hat DocumentationFuse ESBToggle FramesPrintFeedback

Packaging an Application

Applications must be packed as an OSGi bundle before they can be deployed into Fuse ESB. You will not need to include any Fuse Service Framework specific packages in your bundle. The Fuse Service Framework packages are included in Fuse ESB. You need to ensure you import the required packages when building your bundle.

Creating a bundle

To deploy a Fuse Service Framework application into Fuse ESB, you need to package it as an OSGi bundle. There are several tools available for assisting in the process. Fuse ESB uses the Maven bundle plug-in whose use is described in Appendix B.

Required bundle

The Fuse Service Framework runtime components are included in Fuse ESB as an OSGi bundle called org.apache.cxf.cxf-bundle. This bundle needs to be installed in the Fuse ESB container before your application's bundle can be started.

To inform the container of this dependency, you use the OSGi manifest's Required-Bundle property.

Required packages

In order for your application to use the Fuse Service Framework components, you need to import their packages into the application's bundle. Because of the complex nature of the dependencies in Fuse Service Framework, you cannot rely on the Maven bundle plug-in, or the bnd tool, to automatically determine the needed imports. You will need to explicitly declare them.

You need to import the following packages into your bundle:

  • javax.jws

  • javax.wsdl

  • META-INF.cxf

  • META-INF.cxf.osgi

  • org.apache.cxf.bus

  • org.apache.cxf.bus.spring

  • org.apache.cxf.bus.resource

  • org.apache.cxf.configuration.spring

  • org.apache.cxf.resource

  • org.apache.servicemix.cxf.transport.http_osgi

  • org.springframework.beans.factory.config

Example

Example 68 shows a manifest for a Fuse Service Framework application's OSGi bundle.

Example 68. Fuse Service Framework Application Manifest

Manifest-Version: 1.0
Built-By: FinnMcCumial
Created-By: Apache Maven Bundle Plugin
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Import-Package: javax.jws,javax.wsdl,META-INF.cxf,META-INF.cxf.osgi,
org.apache.cxf.bus,org.apache.cxf.bus.spring,org.apache.bus.resource,
org.apache.cxf.configuration.spring, org.apache.cxf.resource,
org.apache.servicemix.cxf.transport.http_cxf,
org.springframework.beans.factory.config
Bnd-LastModified: 1222079507224
Bundle-Version: 4.0.0.fuse
Bundle-Name: Fuse CXF Example
Bundle-Description: This is a sample CXF manifest.
Build-Jdk: 1.5.0_08
Private-Package: org.apache.servicemix.examples.cxf
Required-Bundle: org.apache.cxf.cxf-bundle
Bundle-ManifestVersion: 2
Bundle-SymbolicName: cxf-wsdl-first-osgi
Tool: Bnd-0.0.255

Comments powered by Disqus