File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Spring Dynamic Modules Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Dynamic Modules" Watch "Spring Dynamic Modules" New topic

Spring Dynamic Modules

Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527

Does Spring Dynamic Modules work for OSGi platform only? I know OSGi talks about loosely coupled component and can be added/removed dynamically in running system. How different "Spring Dynamic Modules" from traditional Spring's dependency injection.


SCJP 1.5, SCEA, ICED (287,484,486)
David Newton

Joined: Sep 29, 2008
Posts: 12617

DI isn't dynamic.
Thierry Templier

Joined: Jan 26, 2010
Posts: 15
Hi Anil,

Yes, Spring DM targets OSGi platform only. To simplify, the aim of Spring DM is to leverage Spring facilities to develop OSGi components and make them interact through the OSGi service registry... For that, a dedicated Spring container is embedded in each Spring DM powered component and dependency injection can now be done between components. You are now able to develop same Spring (enterprise or not) applications within an OSGi container ;-)

Otherwise, as David said, the DI is static with Spring only but with Spring DM and OSGi, this behaviour is quite different since you can now update at runtime dependency graphs based on OSGi services. If you inject a service, you can update the dependency at runtime and it's automatically taken into account (internally basing on proxies). Spring DM natively integrates this dynamic behaviour of OSGi...

Hope it answers your question!
I agree. Here's the link:
subject: Spring Dynamic Modules
It's not a secret anymore!