File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Dynamic Modules

 
Anil Vupputuri
Ranch Hand
Posts: 527
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DI isn't dynamic.
 
Thierry Templier
author
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic