O'Reilly logo

Mastering Spring Application Development by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 BundleActivator class
  • The Context.xml file 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.jar
  • com.springsource.org.aopalliance-1.0.0.jar
  • log4j.osgi-1.2.15-SNAPSHOT.jar
  • com.springsource.slf4j.api-1.5.0.jar ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required