Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Bridge between Dispatcher servlet and OSGi registry Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bridge between Dispatcher servlet and OSGi registry

    Hello,
    We are using Equinox Servlet Bridge over a web container to enable OSGi. We register a DispatcherServlet to handle HTTP requests coming from consumers. Here is the issue -
    I would like to use Spring both inside the bundle ( to configure Dispatcher servlet ) and outside the bundle ( to let spring manage the OSGi aspects), however I can't find a way to bridge the gap between the application contexts inside the and outside the bundles. To be specific, I would like to setup a DispatcherServlet's application context that can get services injected from the OSGi registry (outside the bundle).
    If you have come across such a problem, please help.

  • #2
    This isn't easy to achieve since you're literally bridging two different world which leads to two different instances for the same configuration. One thing you could do is try to use statics along with bootpath delegation so that the classes inside OSGi are loaded by the container classloader which, along with some usage of static classes, could allow for referring to a single instance (cached inside a static field/method).

    Comment

    Working...
    X