Announcement Announcement Module
Collapse
No announcement yet.
Accessing Spring DM bean from web context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing Spring DM bean from web context

    Hello,

    i try to create a osgi application, that communicates between two layers. Therefore I use the bean

    Code:
    <bean name="/serviceurl"
    		class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
    		<property name="service" ref="serviceosgi" />
    		<property name="serviceInterface" value="common.IService" />
    </bean>
    This bean resides in the remoting-servlet.xml. The corresponding xml file for the DispatcherServlet, that you need for the communication. As you can see in the snipet above, the property service refers to "serviceosgi". This is a service from spring dm respective gemini blueprint. The serviceosgi bean is created by the spring-osgi-extender, it is a normal osgi-service.

    Now I get a exception, that the bean "/serviceurl" cant find "serviceosgi". The problem is probably, that the web-extender creates the "/serviceurl" bean and the spring-osgi-extender creates the "serviceosgi" bean.

    Is it possible, to refer from the web-context a osgi-service in this way? Has anybody an other solution to invoke an osgi service remotly with the spring-http-invoker?

    With RMI this is no problem. In this case I use the RmiServiceExporter in the spring-dm-files and i can refer without problems an osgi-service. But the http-invoker needs a servlet, hence i can not write the http-invoker-bean in the spring-dm files.

    thanks in advance

    greets
Working...
X