Warning

This component has been deprecated in favor of the servicemix-lwcontainer.

The ServiceMix component allows you to deploy multiple servicemix.xml files into a ServiceMix container.

Deploying the ServiceMix Component

Create and deploy a JBI component archive with a jbi.xml similar to:

{snippet:id=jbi|lang=xml|url=http://svn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/resources/org/servicemix/components/servicemix/component-src/META-INF/jbi.xml}

Deploying the servicemix.xml Files.

The servicemix.xml files are deployed as artifacts of a JBI service assembly. Here's a sample servicemix.xml, notice that the <container> element is replaced with a <serviceunit> element.

{snippet:id=servicemix|lang=xml|url=http://svn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/resources/org/servicemix/components/servicemix/su1-src/servicemix.xml}

The servicemix.xml file needs to be put in a zip file that is inside a service assembly zip file whose jbi.xml deployment descriptor is similar to:

{snippet:id=jbi|lang=xml|url=http://svn.servicemix.codehaus.org/*checkout*/branches/servicemix-1.1/base/src/test/resources/org/servicemix/components/servicemix/au1-src/META-INF/jbi.xml}
  • No labels

5 Comments

  1. Unknown User (lduchene)

    Hi,
    Can you explain your tree structure for each file?
    Because I have tried your explanation and it doesn't work fine.

    I made two files:
    1- service-component-1.0-jbi-installer.jar with this structure:
    + META-INF + jbi.xml
    + MANIFEST
    + jbi.xsd
    + services.xsd

    2- assembly-unit-1.0-jbi-installer.jar with this structure:
    + META-INF + jbi.xml
    + MANIFEST
    + su1.zip
    + jbi.xsd
    + services.xsd

    In su1.zip I have this tree:
    + META-INF + (empty)
    + servicemix.xml
    + jbi.xsd
    + services.xsd

    Can you say me where is my fault?

    Regards,
    Lilian.

  2. Unknown User (lduchene)

    Oups, it's better like below
    1- service-component-1.0-jbi-installer.jar with this structure:
    /META-INF/jbi.xml
    /META-INF/MANIFEST
    /jbi.xsd
    /services.xsd

    2- assembly-unit-1.0-jbi-installer.jar with this structure:
    /META-INF/jbi.xml
    /META-INF/MANIFEST
    /su1.zip
    /jbi.xsd
    /services.xsd

    In su1.zip I have this tree:
    /META-INF/(empty)
    /servicemix.xml
    /jbi.xsd
    /services.xsd

  3. Unknown User (lduchene)

    Hi,
    I have found why there is a mistake !
    That's not in my tree structure above, it's in your jbi.xml of the service assembly. You write:
    ...
    <identification>
    <name>AU:1</name>
    <description>Sample AU</description>
    </identification>
    <service-unit>
    <identification>
    <name>SU:1</name>
    <description>Sample</description>
    </identification>
    ...

    And the error is AU:1 will be a directory on the file system.
    So in Microsoft OS, it's forbidden to use ':' in the directory's name.
    So it's better to put in the service assembly:
    ...
    <identification>
    <name>AU_1</name>
    <description>Sample AU</description>
    </identification>
    <service-unit>
    <identification>
    <name>SU_1</name>
    <description>Sample</description>
    </identification>
    ...

    The result will be after download in 'install' directory:

    INFO TraceComponent - -Body is: <?xml version="1.0" encoding="UTF-8"?><timer><name>My Example Job<
    /name><group>ServiceMix</group><fullname>ServiceMix.My Example Job</fullname><description/><fireTime
    >Mon Oct 24 13:21:50 CEST 2005</fireTime></timer>
    INFO TraceComponent - -Exchange: org.servicemix.jbi.messaging.InOnlyImpl@c743eb received IN messag
    e: org.servicemix.jbi.messaging.NormalizedMessageImpl@3c342b{properties: {org.servicemix.quartz.cont
    ext=JobExecutionContext: trigger: 'ServiceMix.My Example Job job: ServiceMix.My Example Job fireTime
    : 'Mon Oct 24 13:21:51 CEST 2005 scheduledFireTime: Mon Oct 24 13:21:51 CEST 2005 previousFireTime:
    'Mon Oct 24 13:21:50 CEST 2005 nextFireTime: Mon Oct 24 13:21:51 CEST 2005 isRecovering: false refir
    eCount: 0, org.servicemix.quartz.detail=JobDetail 'ServiceMix.My Example Job': jobClass: 'org.servi
    cemix.components.quartz.ServiceMixJob isStateful: false isVolatile: false isDurable: false requestsR
    ecovers: false, org.servicemix.component=org.servicemix.components.quartz.QuartzComponent@1f78040}}

    Lilian.