You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by rs...@imolinfo.it on 2006/08/29 11:55:06 UTC

su declaration order in jbi.xml

Hi I have 4 su contained in one sa
su2 depends on su1
su4 depends on su3

in the project with the pom packaging I have this configuration:
    <modules>
      <module>su1</module>
      <module>su2</module>
      <module>su3</module>
      <module>su4</module>
      <module>sa1</module>
    </modules>

in sa1 pom I have this configuration:

  <dependencies>
      <dependency>
        <groupId>it.imolinfo.iif.sample</groupId>
        <artifactId>su1</artifactId>
        <version>${pom.version}</version>
      </dependency>
      <dependency>
        <groupId>it.imolinfo.iif.sample</groupId>
        <artifactId>su2</artifactId>
        <version>${pom.version}</version>
      </dependency>
      <dependency>
        <groupId>it.imolinfo.iif.sample</groupId>
        <artifactId>su3</artifactId>
        <version>${pom.version}</version>
      </dependency>
      <dependency>
        <groupId>it.imolinfo.iif.sample</groupId>
        <artifactId>su4</artifactId>
        <version>${pom.version}</version>
      </dependency>
  </dependencies>

so essentially I always declare the su in the order from 1 to 4.
When I use the maven plugin to create the service assembly the jbi.xml generated
is the following:

    <service-unit>
      <identification>
        <name>su1</name>
        <description>ServiceMix is an open source ESB based on the Java Business
    Integration framework - JSR-208</description>
      </identification>
      <target>
        <artifacts-zip>su1-0.0.1.zip</artifacts-zip>
        <component-name>iif</component-name>
      </target>
    </service-unit>
    <service-unit>
      <identification>
        <name>su4</name>
        <description>ServiceMix is an open source ESB based on the Java Business
    Integration framework - JSR-208</description>
      </identification>
      <target>
        <artifacts-zip>su4-0.0.1.zip</artifacts-zip>
        <component-name>servicemix-http</component-name>
      </target>
    </service-unit>
    <service-unit>
      <identification>
        <name>su3</name>
        <description>ServiceMix is an open source ESB based on the Java Business
    Integration framework - JSR-208</description>
      </identification>
      <target>
        <artifacts-zip>su3-0.0.1.zip</artifacts-zip>
        <component-name>iif</component-name>
      </target>
    </service-unit>
    <service-unit>
      <identification>
        <name>su2</name>
        <description>ServiceMix is an open source ESB based on the Java Business
    Integration framework - JSR-208</description>
      </identification>
      <target>
        <artifacts-zip>su2-0.0.1.zip</artifacts-zip>
        <component-name>servicemix-http</component-name>
      </target>
    </service-unit>

so that the order is 1,4,3,2.

when I deploy servicemix gets confused as it cannot resolve the dependecy from 4
on 3 and so the su4 is not initialized correctly.

For dependecy between sus I mean that the dependant su expose the endpoint
definied by the other su as a SOAP/HTTP webservice.

If I manually reorder the jbi.xml to 1,2,3,4 all works well.
Any idea on whats causing the problem and how to resolve it?

bye Raffaele


Re: su declaration order in jbi.xml

Posted by Guillaume Nodet <gn...@gmail.com>.
Well, this is not a bug, this is a feature of the maven plugin.
The plugin makes sure that the order of the SU in the jbi
descriptor is the same as in the pom.
You need to order them in the pom :)

On 8/29/06, rspazzoli@imolinfo.it <rs...@imolinfo.it> wrote:
>
> Hi I have 4 su contained in one sa
> su2 depends on su1
> su4 depends on su3
>
> in the project with the pom packaging I have this configuration:
>     <modules>
>       <module>su1</module>
>       <module>su2</module>
>       <module>su3</module>
>       <module>su4</module>
>       <module>sa1</module>
>     </modules>
>
> in sa1 pom I have this configuration:
>
>   <dependencies>
>       <dependency>
>         <groupId>it.imolinfo.iif.sample</groupId>
>         <artifactId>su1</artifactId>
>         <version>${pom.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>it.imolinfo.iif.sample</groupId>
>         <artifactId>su2</artifactId>
>         <version>${pom.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>it.imolinfo.iif.sample</groupId>
>         <artifactId>su3</artifactId>
>         <version>${pom.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>it.imolinfo.iif.sample</groupId>
>         <artifactId>su4</artifactId>
>         <version>${pom.version}</version>
>       </dependency>
>   </dependencies>
>
> so essentially I always declare the su in the order from 1 to 4.
> When I use the maven plugin to create the service assembly the jbi.xmlgenerated
> is the following:
>
>     <service-unit>
>       <identification>
>         <name>su1</name>
>         <description>ServiceMix is an open source ESB based on the Java
> Business
>     Integration framework - JSR-208</description>
>       </identification>
>       <target>
>         <artifacts-zip>su1-0.0.1.zip</artifacts-zip>
>         <component-name>iif</component-name>
>       </target>
>     </service-unit>
>     <service-unit>
>       <identification>
>         <name>su4</name>
>         <description>ServiceMix is an open source ESB based on the Java
> Business
>     Integration framework - JSR-208</description>
>       </identification>
>       <target>
>         <artifacts-zip>su4-0.0.1.zip</artifacts-zip>
>         <component-name>servicemix-http</component-name>
>       </target>
>     </service-unit>
>     <service-unit>
>       <identification>
>         <name>su3</name>
>         <description>ServiceMix is an open source ESB based on the Java
> Business
>     Integration framework - JSR-208</description>
>       </identification>
>       <target>
>         <artifacts-zip>su3-0.0.1.zip</artifacts-zip>
>         <component-name>iif</component-name>
>       </target>
>     </service-unit>
>     <service-unit>
>       <identification>
>         <name>su2</name>
>         <description>ServiceMix is an open source ESB based on the Java
> Business
>     Integration framework - JSR-208</description>
>       </identification>
>       <target>
>         <artifacts-zip>su2-0.0.1.zip</artifacts-zip>
>         <component-name>servicemix-http</component-name>
>       </target>
>     </service-unit>
>
> so that the order is 1,4,3,2.
>
> when I deploy servicemix gets confused as it cannot resolve the dependecy
> from 4
> on 3 and so the su4 is not initialized correctly.
>
> For dependecy between sus I mean that the dependant su expose the endpoint
> definied by the other su as a SOAP/HTTP webservice.
>
> If I manually reorder the jbi.xml to 1,2,3,4 all works well.
> Any idea on whats causing the problem and how to resolve it?
>
> bye Raffaele
>
>


-- 
Cheers,
Guillaume Nodet