Hi All,
We are facing the below problem when declaring OSGi using Spring HttpInvoker.
Really appreciate if I can get any help.
Our application uses OSGi and Spring httpInvoker for remote calls being made to
the OSGi services.The bundles are grouped into 3 levels Platform, ApplicationA
and ApplicationB. Both the Application level bundles depend on Platform bundles
but are independent of each other. The requirement is to deploy these
applications together as well as independently.
There are 3 services:
1. Platform level service (Required for both Applications)
2. Application A level service
3. Application B level service
A section of the xml file from Platform bundle is given below. We cannot add
the references to the Application A or B service in the platform bundle since
the platform level bundle should be independent of the Application bundles.
There cannot be two xml files with the service declarations since both these
applications need to be deployed together. Is there an alternative way to
declare these services in the Application bundles?
<bean id="platformService"
class="com.platform.service.impl.PlatformService"></bean>
<bean id="applicationAService"
class="com.appA.service.impl.ApplicationAService"></bean>
<bean id="applicationBService"
class="com.appB.service.impl.ApplicationBService"></bean>
<bean name="platformServiceExporter"
class="org.springframework.remoting.httpinvoker.SimpleHttpInvokerServiceExporter"
<property name="service" ref="platformService"/>
<property name="serviceInterface"
value="com.platform.service.IPlatformService"/>
</bean>
<bean name="applicationAServiceExporter"
class="org.springframework.remoting.httpinvoker.SimpleHttpInvokerServiceExporter"
<property name="service" ref="applicationAService"/>
<property name="serviceInterface"
value="com.appA.service.IApplicationAService"/>
</bean>
<bean name="applicationBServiceExporter"
class="org.springframework.remoting.httpinvoker.SimpleHttpInvokerServiceExporter"
<property name="service" ref="applicationBService"/>
<property name="serviceInterface"
value="com.appB.service.IApplicationBService"/>
</bean>
<bean id="httpServer"
class="org.springframework.remoting.support.SimpleHttpServerFactoryBean">
<property name="contexts">
<util:map>
<entry key="/remoting/PlatformService" value-ref="platformServiceExporter"/>
<entry key="/remoting/ApplicationAService"
value-ref="applicationAServiceExporter"/>
<entry key="/remoting/ApplicationBService"
value-ref="applicationBServiceExporter"/>
</util:map>
</property>
<property name="port" value="8080" />
</bean>
Thanks
Soniya
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the
property of Persistent Systems Ltd. It is intended only for the use of the
individual or entity to which it is addressed. If you are not the intended
recipient, you are not authorized to read, retain, copy, print, distribute or
use this message. If you have received this communication in error, please
notify the sender and delete all copies of this message. Persistent Systems
Ltd. does not accept any liability for virus infected mails.
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev