Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Modular Java: Spring

Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what exacly Spring provides for OSGi?
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Spring Dynamic Modules for OSGi(tm) Service Platforms project makes it easy to build Spring applications that run in an OSGi framework. A Spring application written in this way provides better separation of modules, the ability to dynamically add, remove, and update modules in a running system, the ability to deploy multiple versions of a module simultaneously (and have clients automatically bind to the appropriate one), and a dynamic service model. OSGi is a registered trademark of the OSGi Alliance. Project name is used pending approval from the OSGi Alliance.

OSGi R4 (or greater) platform
(Spring DM is tested daily against Eclipse Equinox 3.2.x, Knopflerfish 2.2.x and Apache Felix 1.x)
Spring Framework 2.5.6 or greater

[ UD: This post is copied verbatim from Please don't copy and paste text passages without attribution. ]
Posts: 422
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put another way...

Spring dependency injection (plus interface-oriented design) does a great job of enabling development of applications from loosely-coupled objects. But by itself Spring's DI works at a very fine-grained level (at the object level).

Meanwhile, OSGi offers an interface-oriented approach to developing coarse-grained components that are loosely-coupled. But OSGi's native API is a bit cumbersome (not too bad, but still more than I care for) and misses out on wiring objects that make up OSGi services.

Bringing the two together (in Spring-DM) means that you can declare OSGi services using a familiar Spring-style configuration *and* define those services as a collaboration among several beans that are wired together. On the service-consumption side, Spring-DM let's you declare that you want to consume a service (identified by its interface) and then wire that service into Spring beans as if the service were just another POJO in the same context.
    Bookmark Topic Watch Topic
  • New Topic