servicemix-lwcontainer

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.

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

Deployment

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

<beans xmlns:sm="http://servicemix.apache.org/config/1.0">
  <sm:serviceunit id="jbi">
    <sm:activationSpecs>
      <sm:activationSpec ...>
        <sm:component>
          <bean class="..." ...>
            ...
          </bean>
        </sm:component>
      </sm:activationSpec>
      ...
    </sm:activationSpecs>
  </sm:serviceunit>
</beans>

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:

  <classpath>
    <location>.</location>
  </classpath>

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

  <classpath>
    <location>lib/foo.jar</location>
  </classpath>