ServiceMix LightWeight Container

The lightweight components are deprecated. You can use the servicemix-bean component instead to deploy your own simple components, or use the standard components.

The servicemix-lwcontainer is a JBI service engine that accepts servicemix.xml configuration files containing
lightweight components.

Take a look at the loan-broker demo or the bpel-bpe demo that ships with ServiceMix 3.x distributions.

Maven Archetype

You can use Maven servicemix-lwcontainer-service-unit archetype to create a LW container service unit:

mvn archetype:create \
  -DarchetypeGroupId=org.apache.servicemix.tooling \
  -DarchetypeArtifactId=servicemix-lwcontainer-service-unit \
  -DarchetypeVersion=2010.01 \ \ \


Service units targeted at servicemix-lwcontainer component should contain a file named servicemix.xml that should have the following format:

<beans xmlns:sm="">
  <sm:serviceunit id="jbi">
      <sm:activationSpec ...>
          <bean class="..." ...>

If you need to write your own components, you can easily embed some code using the following xml fragment at the top of the previous file:


This will add the content of the location tags (relative to the unzipped service unit) to the classpath. The previous configuration will just add the class files contained in the service unit, as if it is a plain jar.

If you want to embed jars, just use something like

  • No labels