Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
КУ: [swordfish-dev] Proposal: Wizard support for creating composite services

Instead of  "copying" the consumer definitions from the consumer projects' spring configs into a new spring config in the provider project (e.g. META-INF/spring/consumers.xml), we may reference the JAX-WS consumer as the osgi service.

The consumer project should register its JAXWS clients as the osgi services

    <jaxws:client id="flightReservationClient"  serviceClass="org.eclipse.swordfish.samples.flightreservation.FlightReservation"                    
                 serviceName="serviceNamespace1:FlightReservationService"
                  address="nmr:FlightReservationService" />
    <osgi:service ref="flightReservationClient" interface="org.eclipse.swordfish.samples.flightreservation.FlightReservation">
<osgi:service-properties>
<entry key="ID" value="SOME_UNIQUE_ID" />
</osgi:service-properties>
    </osgi:service>

The existing wizard can be easily enhanced to do this.
On the provider side we need only to reference the exported client:
<osgi:reference id="flightReservationClient" 
         interface="org.eclipse.swordfish.samples.flightreservation.FlightReservation filter="(ID=SOME_UNIQUE_ID)/>
<bean id="flightbooking"  
     class="org.eclipse.swordfish.samples.flightbooking.FlightBookingImpl">
    <property name="flightReservation"  ref="flightReservationClient"/>     
</bean>
    <jaxws:endpoint id="flightBookingService"
                    implementor="#flightbooking"
                    address="nmr:FlightBookingService">
    </jaxws:endpoint>


This approach is suitable for both proposals and it allows to overcome issues with copying complex user modified spring application contexts, that will cause lots of ClassLoading & resource not found(when the application context imports another one) errors

Best regards

Volodymyr




---------- Forwarded message ----------  
From: Volodymyr Zhabiuk <vzhabiuk@xxxxxxxxx>
Date: 2009/9/24
Subject: RE: [swordfish-dev] Proposal: Wizard support for creating composite services
To: swordfish-dev@xxxxxxxxxxx


Hello All

Would prefer the option #1. But I think, we shouldn't copy any spring
definitions, just register service consumers as OSGI services and
reference them in the provider project instead

Thanks

Volodymyr


Back to the top