wood burning stoves 2.0*
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
Author

Spring Dynamic Modules

Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
Hi,

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.

Thanks.


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

Joined: Sep 29, 2008
Posts: 12617

DI isn't dynamic.
Thierry Templier
author
Greenhorn

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!
Thierry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Dynamic Modules