This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Modular Java: Spring

 
Tomasz Prus
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what exacly Spring provides for OSGi?
 
binayakumar patel
Greenhorn
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.

Requirements
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 http://www.springsource.org/osgi/. Please don't copy and paste text passages without attribution. ]
 
Craig Walls
author
Ranch Hand
Posts: 363
8
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic