Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First some background. A JBI component is either a service engine (SE) or a binding component (BC). These terms are defined in #Introduction to ESB and/or the #Glossary. A BC/SE is installed on ServiceMix by copying it into the install directory which resides under the ServiceMix home directory. So what gets deployed? JBI components can act as containers themselves. Artifacts can be deployed to an existing BC or SE to add more functionality to that component. Adding artifacts to installed components is called deployment. To deploy artifacts to a component the artifacts can be placed in the deploy directory under the ServiceMix home directory. Another term that is important to know is service assembly. A service assembly is a collection of deployment artifacts and metadata. A service unit is a single deployment artifact which is deployed on a single component. For deployment to happen, the artifacts must be in a very specific format, which is specified in the JSR 208 specification. Please see chapter 6 of the JSR 208 specification for more details.
In addition to deploying components, ServiceMix allows servicemix.xml files to be deployed in a similar method to deploying a component.

This section will show how to deploy a servicemix.xml file:unmigrated-wiki-markup

Let's use one of the existing examples and modify it to make it a deployment unit.
The quartz example is a good one.
For a source distribution" distribution:

  1. Wiki Markup
    cd \[servicemix_install_dir\]\assembly\target\servicemix-2.0.2\bin\servicemix-2.0.2\examples\quartz-binding

...

  1. create

...

  1. a

...

  1. directory

...

  1. elsewhere,

...

  1. such

...

  1. as

...

  1. \temp\JBIcomponent

...

  1. copy

...

  1. servicemix.xml

...

  1. to

...

  1. \temp\JBIcomponent

...

  1. cd

...

  1. \temp\JBIcomponent

...

  1. edit

...

  1. servicemix.xml

...

    • need to change a few things to make this a service unit, please see the code here:
      Code Block

  1. Two jar files must be created. These jar files will be copied into the ServiceMix deploy directory.
    The first jar file will contain the service component jbi.xml file. The file should contain:
    Code Block
    1. Put jbi.xml in an empty META-INF directory and put that into a jar file:
      Code Block
      
      jar cvf service-component.jar *
      
    2. Then create a zip file of the servicemix.xml file you modified above. The

...

Deploying JBI Components on Geronimo Using the Geronimo Deployment Tool

...