Results 1 to 2 of 2

Thread: Bridge between Dispatcher servlet and OSGi registry

  1. #1
    Join Date
    Aug 2009
    Posts
    1

    Default 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. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    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).
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •