...
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:
Wiki Markup cd \[servicemix_install_dir\]\assembly\target\servicemix-2.0.2\bin\servicemix-2.0.2\examples\quartz-binding
...
- create
...
- a
...
- directory
...
- elsewhere,
...
- such
...
- as
...
- \temp\JBIcomponent
...
- copy
...
- servicemix.xml
...
- to
...
- \temp\JBIcomponent
...
- cd
...
- \temp\JBIcomponent
...
- edit
...
- servicemix.xml
...
- need to change a few things to make this a service unit, please see the code here:
Code Block
- need to change a few things to make this a service unit, please see the code here:
- 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 componentjbi.xml
file. The file should contain:Code Block - Put
jbi.xml
in an empty META-INF directory and put that into a jar file:Code Block jar cvf service-component.jar *
- Then create a zip file of the
servicemix.xml
file you modified above. The
- Put
...
Deploying JBI Components on Geronimo Using the Geronimo Deployment Tool
...