6

What is the status of the current developments around Spring and OSGi?

It looks like things have gotten a bit quiet lately.

The latest version of the doc at (http://docs.spring.io/osgi/) is from 2009.

I see some announcements that Spring DM has become Eclipse Gemini Blueprint (http://www.eclipse.org/gemini/blueprint/documentation/migration/). But also there, the latest release is from August 2012.

Is Spring and OSGi a dead path? If so, what other options are there to make a spring application modular (e.g. allow deployment, starting, stopping & updating of a module within a running JVM)?

Thanks

Andy Flury
  • 316
  • 2
  • 10

2 Answers2

4

I agre that spring on OSGi is a dead end. There does not seem to be any real drive in it since springsource abandoned OSGi.

There are some alternatives though. The most stable and complete one is Apache Aries at the moment. It provides blueprint support which is similar to spring xml and some extensions like jpa container managed transactions. Be aware though that aries still contains much less functionality then spring. So for example annotation support is very limited.

Alternatives to Aries blueprint are Declarative Services and pax CDI. Declarative services is very small footprint and quite stable and has great supports for the dynamics of OSGi. On the other hand it is even more limited than blueprint. So for example there is no special jpa support at all.

PAX CDI aims to provide Java EE on OSGi using Open Webbeans or Weld + some extensions like Deltaspike. Together it would provide similar comfort like Java EE 6. Unfortunately it is not completely finished so at the moment I would not yet consider it ready for production use.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
  • Thanks Christian. can any of these other options be combined with Spring. Our entire application is built on Spring, so migrating away from Spring is not really an option. We are just looking for an option to add modularity to it. – Andy Flury Jul 28 '14 at 18:28
  • Well there isn't really any need to migrate away from Spring. Things should continue to work, after all. – Neil Bartlett Jul 28 '14 at 21:01
  • I don't understand. What would be the right way run a Spring application in a modular/OSGi way and using Spring Beans as OSGi services? – Andy Flury Jul 28 '14 at 21:10
  • You can use spring dm of course. It works for what it can do but there is no real support or fixes. Springsource still got some documentation about it. If you absolutely want to keep spring then honestly I would avoid to migrate to OSGi. – Christian Schneider Jul 28 '14 at 21:50
  • Thanks Christian. But is there any other way to achieve modularity with Spring other than with OSGi? – Andy Flury Jul 28 '14 at 22:05
  • What kind of modularity do you need? Do you need to add modules at runtime or just at startup or your application? – Christian Schneider Jul 29 '14 at 07:02
  • I have no personal benefit of saying this. I am only very disappointed by springsource leaving OSGi behind. So what is your impression of gemini? – Christian Schneider Jul 29 '14 at 09:40
  • Well, i am disappointed by springsource too, cause they leave behind. But you shouldn't blame eclipse gemini/virgo team for it. If you check the mailing lists and the bug-tracker, you will find out there is still development, bugs become fixed and there are also less bugs. The biggest problem so far is that the springsource EBR was shut down, and eclipse is still working on its own EBR. – Martin Baumgartner Jul 29 '14 at 09:50
  • I looked at the source code at http://git.eclipse.org/c/gemini.jpa/org.eclipse.gemini.jpa.git/stats/?period=q&ofs=10 . It looks like there is no recent activity. Am I looking at the wrong repo? One big issue I have with eclipse projects is that they are not available on maven central. I think publishing the artifacts there would help a lot. – Christian Schneider Jul 29 '14 at 09:57
2

Gemini Blueprint is still active, right now gemini blueprint upgraded to support R5 and M2 is available in the eclipse nexus.

Martin Baumgartner
  • 3,524
  • 3
  • 20
  • 31