This page introduces JBI components and shows how to install them in ServiceMix

Components

Before you can start building your own integration application (also known as service assemblies), you need to add support to the JBI container for the types of transports and services you will be building. You can do this by installing additional components on the JBI container. The components come in two flavors:

  • Binding Components provide additional transports to the container.
    An example: the servicemix-http binding component allows to send messages into the ESB using HTTP
  • Service Engines add support for another type of business logic to the container.
    An example: the servicemix-saxon service engine allows you to easily build applications that do XSL-T transformations

Installing components

Changes with ServiceMix 3.2
  • the hot-deploy directory for components has changed. You can now install components by copying it to the <servicemix_home>/hotdeploy.
  • all out-of-the-box components are delivered inside the hot-deploy directory, so they are installed automatically. (you can skip the rest of this page)

Out-of-the-box, ServiceMix has a lot of components readily available for you to use. You can find them in <servicemix_home>/components.

In order to install a component, you have to copy it to <servicemix_home>/install (this is the hot-install directory for components: whenever you drop a component installer archive in there, it will be automatically extracted and installed on the container).

For our next example, we want to use:

  • servicemix-shared: a shared libary by all ServiceMix JBI components
    <servicemix_home>/components/servicemix-shared-<version>-installer.zip
  • servicemix-http: binding component to provide the HTTP/SOAP transport
    <servicemix_home>/components/servicemix-http-<version>-installer.zip
  • servicemix-jsr181: service engine which adds support for building JSR-181 compliant web services within ServiceMix
    <servicemix_home>/components/servicemix-jsr181-<version>-installer.zip

Install the required components now. After you have copied all 3 archives into the install directory, your console should look like this.

Starting Apache ServiceMix ESB: <version>

Loading Apache ServiceMix from servicemix.xml on the CLASSPATH
INFO  - ConnectorServerFactoryBean     - JMX connector available at: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO  - JBIContainer                   - ServiceMix <version> JBI Container (ServiceMix) is starting
INFO  - JBIContainer                   - For help or more informations please see: http://incubator.apache.org/servicemix/
INFO  - ComponentMBeanImpl             - Initializing component: #SubscriptionManager#
INFO  - DeploymentService              - Restoring service assemblies
INFO  - JBIContainer                   - ServiceMix JBI Container (ServiceMix) started
INFO  - JDBCAdapterFactory             - Database driver recognized: [apache_derby_embedded_jdbc_driver]
INFO  - LogTask                        - Logging system reconfigured using file: file:/home/gert/opt/apache-servicemix-<version>/conf/log4j.xml
INFO  - AutoDeploymentService          - Directory: install: Archive changed: processing servicemix-shared-<version>-installer.zip ...
INFO  - AutoDeploymentService          - Directory: install: Finished installation of archive:  servicemix-shared-<version>-installer.zip
INFO  - AutoDeploymentService          - Directory: install: Archive changed: processing servicemix-http-<version>-installer.zip ...
INFO  - jetty                          - Logging to org.apache.servicemix.http.jetty.JCLLogger@4e850e8c via org.apache.servicemix.http.jetty.JCLLogger
INFO  - ComponentMBeanImpl             - Starting component: servicemix-http
INFO  - ComponentMBeanImpl             - Initializing component: servicemix-http
INFO  - AutoDeploymentService          - Directory: install: Finished installation of archive:  servicemix-http-<version>-installer.zip
INFO  - AutoDeploymentService          - Directory: install: Archive changed: processing servicemix-jsr181-<version>-installer.zip ...
INFO  - ComponentMBeanImpl             - Starting component: servicemix-jsr181
INFO  - ComponentMBeanImpl             - Initializing component: servicemix-jsr181
INFO  - AutoDeploymentService          - Directory: install: Finished installation of archive:  servicemix-jsr181-<version>-installer.zip

Congratulations, you now have ServiceMix up and running as a JBI container and you've installed the necessary components to support HTTP transport to a JSR-181 compliant webservice. Next, let us go ahead and use these features for our first example.

Things to remember

  • JBI Components (Binding Components and Service Engines) are plug-ins that add features to the JBI Container
  • You can install a JBI Component by copying it to <servicemix_home>/install

Further reading

  • Components list contains a list of standard JBI Components that are being delivered with ServiceMix, as well as some others that are readily available on the web.