Integrating Spring Dynamic Modules with OSGI
In this section, let us demonstrate how we can integrate Spring Dynamic Modules to work with an OSGI application. Spring Dynamic Modules (Spring DM) makes the development of OSGI-based applications a lot easier. We can easily inject the services like any other Spring beans.
We shall look at the following dependencies required to integrate Spring Dynamic Modules:
OSGI services
The
BundleActivatorclassThe
Context.xmlfile configuration to inject in the service
The following is the list of dependencies that needs to be made available in the application classpath:
com.springsource.net.sf.cglib-2.1.3.jarcom.springsource.org.aopalliance-1.0.0.jarlog4j.osgi-1.2.15-SNAPSHOT.jarcom.springsource.slf4j.api-1.5.0.jarcom.springsource.slf4j.log4j-1.5.0.jarcom.springsource.slf4j.org.apache.commons.logging-1.5.0.jarorg.springframework.aop-3.x.jarorg.springframework.beans-3.x.jarorg.springframework.context-3.x.jarorg.springframework.core-3.x.jar...