Announcement Announcement Module

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
Spring DM in an application server Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring DM in an application server


    we are starting to develop a new application and would like to take advantage of the benefits of Spring dm/SpringSource dm Server or OSGi in general. In fact, we are migrating a whole product line, which will consist of a few web apps, which are using a base service app for common data and services. In that sense, this is will be a set of highly modular applications which are interconnected in a more service-oriented way.

    New to the whole OSGi thing, we are very impressed by it. Especially Spring dm and SpringSource dm Server would really fit our needs best. Our problem though is, that our customer requires the app to run on their application server (a websphere), so we can just install neither a SpringSource dm Server nor any OSGi platform to run our app on. Or do you see any chance to do so?

    The last chance we see to use OSGi, is to use a bridge (see for example "Hello, OSGi, Part3" on JavaWorld, or Server-Side Equinox). With this approach we would run a WAR-package, inside that we run an OSGi container, on that we run a Spring dm powered web app. Does anyone have any experience with this approach? We could imagine that there is a problem running basically many webapps (our applications) inside another web app (the bridge), especially when running multiple of them. Another thing, that could be an issue is that there is a larger gap between the bridge (e.g. servlet filters (OSIV, Security), web.xml in general) and the web applications inside the bridge, because these (in a sense) are not running inside the WAR directly but in an OSGi container inside that (could I make that point clear?).

    We would be so happy if we could use OSGi/Spring DM/Server. Any suggestions?

    Last edited by cretzel; Sep 18th, 2008, 03:48 AM.

  • #2

    We are using spring-dm embedded into an existing web container using the Equinox servlet bridge and it works pretty fine and stable. Nevertheless we are not using any real web support of spring in this setting. We have just slightly added some stuff to spring dm to get the web support to work for the http-based remoting, not more. Don't know if this would help you...



    • #3
      Thanks, Martin, for your reply.

      We were just trying out the Equinox bridge way. But actually we are having a really, really hard time getting all those dependencies and classloader issues fixed. We will use some common libraries such as Hibernate and Wicket in our apps and in many cases we face hard problems getting those APIs to run on the OSGi platform.

      Another thing we couldn't try out yet, is to run more than one web app inside one bridge.

      Any more comments? We're close to giving up this approach, which would be really sad, because OSGi has so many advantages.



      • #4
        We are using Hibernate without any problems in such an environment, but we are using Equinox buddy loading to work around the classloading issues. Its not the best solution from an OSGi point of view but sometimes helps to deal with those libs.

        I don't know wicket to give any advice but maybe buddy loading helps here as well...?

        With regards to the multiple web apps inside one bridge: I think the servlet bridge of equinox is pretty stupid with regards to its functionality. It more or less delegates servlet requests to the OSGi HttpService. And you can register as many servlets as you want at this service (or via the http extension registry) and it doesn't matter to which of your logical applications your servlets belong. But I am not an expert for web apps, so this is just my OSGi and servlet bridge point of view.

        If you have questions regarding the servlet bridge the equinox newsgroup at Eclipse is always a good place to go. Simon Kaegi (he developed the servlet bridge) is a brilliant guy and may help you a lot more than I can here.



        • #5
          For embedding dm Server (which addressed the ORM/LoadTimeWeaving problems) I suggest opening a discussion on the dm forum (which you can access after you register for the beta program:
          As for Spring DM, by itself, the core runs inside an OSGi platform which can be be embedded (it's just a JAR at the end of the day).
          The web support requires the presence of the web container as an OSGi service (see the docs) which needs to be address, in case of embedding.
          The alternative would be to use the ServletBridge/HttpServlet (as Marting pointed out) though you lose some benefits.
          Hope this helps,


          • #6

            I have the same use case of integrating Spring DM, Spring WS and Spring Web in an application server (e.g. Websphere).
            Unfortunately I couldn't find more informations in this forum or the equinox ones. I did not find something in the documentation either.
            Could anybody share some wisdom and/or provide some links?

            Thanks in advance