SlideShare a Scribd company logo
1 of 29
Spring DM - OSGi with Spring Framework Patrick Baumgartner AD Consultant patrick.baumgartner@trivadis.com Zürich, 10.11.2009
About me Application Development Consultant Web development with Spring Framework OSGi with Spring DM &  Spring Framework Agile Software Development Certified ScrumMaster Co-Author of "OSGi in der Praxis“ Spring Dynamic Modules - OSGi with Spring Framework 2
Agenda What is OSGi? The hard-coding Way Declarative Services Spring DM Blueprint Services Demo Conclusion Spring Dynamic Modules - OSGi with Spring Framework 3
What is OSGi? The OSGi framework is a module system for Java that implements a complete and dynamic component model, something that does not exist in standalone Java/VM environments. […] (Source: Wikipedia) Spring Dynamic Modules - OSGi with Spring Framework 4
Bundle Manifest – A special JAR Spring Dynamic Modules - OSGi with Spring Framework 5 Image Source: http://www.handycandy.co.uk
Lifecycle of a Bundle Spring Dynamic Modules - OSGi with Spring Framework 6 UPDATE REFRESH INSTALL STARTING INSTALLED START UPDATE REFRESH RESOLVE EXCEPTION ACTIVE RESOLVED UNINSTALL UNINSTALL STOP STOPPING UNINSTALLED
Service Registry Spring Dynamic Modules - OSGi with Spring Framework 7 SERVICE REGISTRY REGISTER DISCOVER SERVICE DESCRIPTION BIND SERVICE CONSUMER SERVICE  PROVIDER
OSGi – A Module System for Java Clear boundaries Dependencies Metadata Lifecycle Service Registry Spring Dynamic Modules - OSGi with Spring Framework 8
The hard-coding Way Spring Dynamic Modules - OSGi with Spring Framework 9
The hard-coding Way – Register a Service Register 	ServiceRegistration reg = bundleContext.registerService(	ChatterBoxService.class.getName(), 		twitterChatterbox, properties); Unregister 	reg.unregister(); Spring Dynamic Modules - OSGi with Spring Framework 10
The hard-coding Way – Consume a Service Get Service 	ServiceReference ref = bundleContext.getServiceReference(	ChatterBoxService.class.getName()); 	ChatterBoxService chatterbox = 	(ChatterBoxService)bundleContext.getService(ref); Unget Service 	bundleContext.ungetService(ref); Spring Dynamic Modules - OSGi with Spring Framework 11
The hard-coding Way – Consume a Service Get Service with ServiceTracker 	ServiceTracker tracker = new ServiceTracker(	bundleContext, LogService.class.getName(), 	serviceTrackerCustomizer); 	tracker.open();LogService logService = (LogService) tracker.getService(); Spring Dynamic Modules - OSGi with Spring Framework 12
Declarative Services Spring Dynamic Modules - OSGi with Spring Framework 13
Declarative Services Declarative Services (DS) are part of OSGi R4 Specification – Service Compendium Declaration of components in XML OSGI-INF/<component>.xml Components provides and depend on other Services  Components need a special bundle manifest headere.g. Service-Component: OSGI-INF/TwitterChatterBox.xml Spring Dynamic Modules - OSGi with Spring Framework 14
Declarative Services <?xml version="1.0" encoding="UTF-8"?> <component name="com.trivadis.chatterbox.twitter">    <implementation       class="com.trivadis.chatterbox.twitter.service.internal.TwitterChatterboxServiceImpl"/>    <service>       <provide      interface="com.trivadis.chatterbox.service.ChatterBoxService"/>    </service> <reference name="LOGGER"       interface="org.osgi.service.log.LogService"       cardinality="0..n"       policy="dynamic"       bind="addLogService"       unbind="removeLogService"/> </component> Spring Dynamic Modules - OSGi with Spring Framework 15
Spring Dynamic Modules Spring Dynamic Modules - OSGi with Spring Framework 16
Spring Dynamic Modules Integration of Springs Dependency Injection and OSGi Formerly known as Spring OSGi XML files are located in META-INF/spring Very similar approach compared to DS Uses Spring DI for references to other Services and POJOs (Almost) no dependencies on OSGi APIs Components need a special bundle manifest headere.g. Spring-Context: META-INF/spring/bundle-context.xml, … Spring Dynamic Modules - OSGi with Spring Framework 17
The Spring DM Idea Spring Dynamic Modules - OSGi with Spring Framework 18 APPLICATION CONTEXT APPLICATION CONTEXT APPLICATION CONTEXT Imported Service Exported Service Spring Bean SPRING & SPRING DM OSGI FRAMEWORK JVM
Spring Dynamic Modules bundle-context.xml <beans … > <bean id="twitterChatterBox"class="com.trivadis.chatterbox.twitter.service.internal.TwitterChatterboxServiceImpl"> 	<property name="logService" ref="logServiceOsgi" /> </bean> </beans> Spring Dynamic Modules - OSGi with Spring Framework 19
Spring Dynamic Modules bundle-context-osgi.xml <beans:beans …>    <service ref="twitterChatterBox"       interface="com.trivadis.chatterbox.service.ChatterBoxService"/>    <reference id="logServiceOsgi"   interface="org.osgi.service.log.LogService" /> </beans:beans> Spring Dynamic Modules - OSGi with Spring Framework 20
Spring Dynamic Modules Also supports listeners, filters, and collections Dynamics are handled by the framework Proxies for service instances and collections Method calls are buffered Configurable timeouts Annotation-Based Injection with @ServiceReference Spring Dynamic Modules - OSGi with Spring Framework 21
Blueprint Services Spring Dynamic Modules - OSGi with Spring Framework 22
Blueprint Services Blueprint Services are a Standard since OSGi R 4.2 and based on the Ideas of Spring DM 1.0 Spring DM 2.0 is the Reference Implementation (RI) Apache Aries Blueprint is an other implementation Extremely similar to Spring DM but a standard XML files are located in META-INF/blueprint Components need a special bundle manifest headere.g. Bundle-Blueprint: OSGI-INF/blueprint/config.xml, … Spring Dynamic Modules - OSGi with Spring Framework 23
Blueprint Services config.xml <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">    <bean id="twitterChatterBox"               class="com.trivadis.chatterbox.twitter.service.internal.TwitterChatterboxServiceImpl">       <property name="logService" ref="logService" />    </bean>    <service ref="twitterChatterBox"                    interface="com.trivadis.chatterbox.service.ChatterBoxService" />    <reference id="logService"      interface="org.osgi.service.log.LogService" /> </blueprint> Spring Dynamic Modules - OSGi with Spring Framework 24
Comparison Spring DM vs. Blueprint Services Dependency Injection Spring Dynamic Modules - OSGi with Spring Framework 25 Spring DM Blueprint Services Constructor Injection Setter Injection Field Injection Method Injection  Arbitrary Method Injection Autowiring YES YES YES YES YES YES YES YES NO NO NO NO Source: Spring Dynamic Modules Reference Guide 2.0.0.M1
Comparison Spring DM vs. Blueprint Services Component Lifecycle Spring Dynamic Modules - OSGi with Spring Framework 26 Spring DM Blueprint Services Lazy Initialization Bean Scopes Custom Bean Scopes Built-in Callbacks Custom Callbacks Initialization Processing YES YES YES YES YES YES YES YES NO NO YES NO Source: Spring Dynamic Modules Reference Guide 2.0.0.M1
Demo Spring Dynamic Modules - OSGi with Spring Framework 27
Conclusion Should I use Declarative Services, Spring DM or Blueprint Services? DS, DM or Blueprint Services are better than program the life cycles and service infrastructure by hand If you already use Spring, use Spring DM If you want to use Standards use DS or Blueprint To switch from Blueprint Services to Spring DM you need just a few changes in the XML configuration. Spring Dynamic Modules - OSGi with Spring Framework 28
Thank you!

More Related Content

What's hot

Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architectureIgor Khotin
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Steven Smith
 
Grokking #9: Building a real-time and offline editing service with Couchbase
Grokking #9: Building a real-time and offline editing service with CouchbaseGrokking #9: Building a real-time and offline editing service with Couchbase
Grokking #9: Building a real-time and offline editing service with CouchbaseOliver N
 
Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017AmarInfotech
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerLeanIX GmbH
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patternsAlbert Brand
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET CoreMiroslav Popovic
 
TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015DotNetCampus
 
Will the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerWill the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerCodeValue
 
Lagom framework
Lagom frameworkLagom framework
Lagom framework명주 김
 
Develop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val KarpovDevelop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val KarpovMongoDB
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019graemerocher
 
Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?Pixel Crayons
 
Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018graemerocher
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesEastBanc Tachnologies
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React NativePolidea
 

What's hot (20)

Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architecture
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
 
Grokking #9: Building a real-time and offline editing service with Couchbase
Grokking #9: Building a real-time and offline editing service with CouchbaseGrokking #9: Building a real-time and offline editing service with Couchbase
Grokking #9: Building a real-time and offline editing service with Couchbase
 
Mini-Training Owin Katana
Mini-Training Owin KatanaMini-Training Owin Katana
Mini-Training Owin Katana
 
Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017Latest Javascript MVC & Front End Frameworks 2017
Latest Javascript MVC & Front End Frameworks 2017
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and Swagger
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patterns
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015
 
Will the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerWill the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir Zuker
 
Lagom framework
Lagom frameworkLagom framework
Lagom framework
 
Develop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val KarpovDevelop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val Karpov
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019
 
Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?
 
Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc Technologies
 
ASP.NET 5 Overview
ASP.NET 5 OverviewASP.NET 5 Overview
ASP.NET 5 Overview
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
ASP.NET Core
ASP.NET CoreASP.NET Core
ASP.NET Core
 

Viewers also liked

Modular Web Applications with OSGi
Modular Web Applications with OSGiModular Web Applications with OSGi
Modular Web Applications with OSGiSam Brannen
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application DevelopmentChristian Baranowski
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...mfrancis
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafkaconfluent
 
Microservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafMicroservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafAchim Nierbeck
 
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...confluent
 
Enabling Real-Time Analytics for IoT
Enabling Real-Time Analytics for IoTEnabling Real-Time Analytics for IoT
Enabling Real-Time Analytics for IoTSingleStore
 
Tapjoy: Building a Real-Time Data Science Service for Mobile Advertising
Tapjoy: Building a Real-Time Data Science Service for Mobile AdvertisingTapjoy: Building a Real-Time Data Science Service for Mobile Advertising
Tapjoy: Building a Real-Time Data Science Service for Mobile AdvertisingSingleStore
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBMongoDB
 

Viewers also liked (9)

Modular Web Applications with OSGi
Modular Web Applications with OSGiModular Web Applications with OSGi
Modular Web Applications with OSGi
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application Development
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
 
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache KafkaStrata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
Strata+Hadoop 2017 San Jose: Lessons from a year of supporting Apache Kafka
 
Microservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafMicroservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karaf
 
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
Strata+Hadoop 2017 San Jose - The Rise of Real Time: Apache Kafka and the Str...
 
Enabling Real-Time Analytics for IoT
Enabling Real-Time Analytics for IoTEnabling Real-Time Analytics for IoT
Enabling Real-Time Analytics for IoT
 
Tapjoy: Building a Real-Time Data Science Service for Mobile Advertising
Tapjoy: Building a Real-Time Data Science Service for Mobile AdvertisingTapjoy: Building a Real-Time Data Science Service for Mobile Advertising
Tapjoy: Building a Real-Time Data Science Service for Mobile Advertising
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDB
 

Similar to OSGi with the Spring Framework

The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's Howmrdon
 
Creating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsCreating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsRicardo Varela
 
Apache Aries Blog Sample
Apache Aries Blog SampleApache Aries Blog Sample
Apache Aries Blog SampleSkills Matter
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesTikal Knowledge
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overviewmarpierc
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCPwhbath
 
RomaFramework Tutorial Basics
RomaFramework Tutorial BasicsRomaFramework Tutorial Basics
RomaFramework Tutorial BasicsLuca Garulli
 
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008Frederic Conrotte
 
GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009marpierc
 
Flex_rest_optimization
Flex_rest_optimizationFlex_rest_optimization
Flex_rest_optimizationKhou Suylong
 
IMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLAIMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLACharles Severance
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVCAlan Dean
 

Similar to OSGi with the Spring Framework (20)

The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's How
 
Cocoon OSGi CocoonGT2007
Cocoon OSGi CocoonGT2007Cocoon OSGi CocoonGT2007
Cocoon OSGi CocoonGT2007
 
Creating Yahoo Mobile Widgets
Creating Yahoo Mobile WidgetsCreating Yahoo Mobile Widgets
Creating Yahoo Mobile Widgets
 
Apache Aries Blog Sample
Apache Aries Blog SampleApache Aries Blog Sample
Apache Aries Blog Sample
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCP
 
RomaFramework Tutorial Basics
RomaFramework Tutorial BasicsRomaFramework Tutorial Basics
RomaFramework Tutorial Basics
 
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
 
GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009GTLAB Installation Tutorial for SciDAC 2009
GTLAB Installation Tutorial for SciDAC 2009
 
Spring boot
Spring bootSpring boot
Spring boot
 
Ibm
IbmIbm
Ibm
 
Spring Surf 101
Spring Surf 101Spring Surf 101
Spring Surf 101
 
Flex_rest_optimization
Flex_rest_optimizationFlex_rest_optimization
Flex_rest_optimization
 
IMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLAIMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLA
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 

More from Patrick Baumgartner

Neo4j Introduction (for Techies)
Neo4j Introduction (for Techies)Neo4j Introduction (for Techies)
Neo4j Introduction (for Techies)Patrick Baumgartner
 
No Sql in Enterprise Java Applications
No Sql in Enterprise Java ApplicationsNo Sql in Enterprise Java Applications
No Sql in Enterprise Java ApplicationsPatrick Baumgartner
 
Daten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4jDaten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4jPatrick Baumgartner
 
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow BaselHow to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow BaselPatrick Baumgartner
 
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow ZurichHow to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow ZurichPatrick Baumgartner
 
BED-Con - Tools für den täglichen Kampf als Entwickler
BED-Con - Tools für den täglichen Kampf als EntwicklerBED-Con - Tools für den täglichen Kampf als Entwickler
BED-Con - Tools für den täglichen Kampf als EntwicklerPatrick Baumgartner
 
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, OehmichenJFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, OehmichenPatrick Baumgartner
 
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGiOSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGiPatrick Baumgartner
 
Pax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPatrick Baumgartner
 

More from Patrick Baumgartner (11)

Customer is king
Customer is kingCustomer is king
Customer is king
 
Neo4j Introduction (for Techies)
Neo4j Introduction (for Techies)Neo4j Introduction (for Techies)
Neo4j Introduction (for Techies)
 
No Sql in Enterprise Java Applications
No Sql in Enterprise Java ApplicationsNo Sql in Enterprise Java Applications
No Sql in Enterprise Java Applications
 
Daten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4jDaten natuerlich modellieren und verarbeiten mit Neo4j
Daten natuerlich modellieren und verarbeiten mit Neo4j
 
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow BaselHow to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Basel
 
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow ZurichHow to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich
How to use NoSQL in Enterprise Java Applications - NoSQL Roadshow Zurich
 
BED-Con - Tools für den täglichen Kampf als Entwickler
BED-Con - Tools für den täglichen Kampf als EntwicklerBED-Con - Tools für den täglichen Kampf als Entwickler
BED-Con - Tools für den täglichen Kampf als Entwickler
 
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, OehmichenJFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
JFS 2011 - Top 10 Tools & Methoden - Baumgartner, Oehmichen
 
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGiOSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
OSGi für Praktiker - Web Applikationen und verteilte Systeme mit OSGi
 
Pax – Tools für den OSGi Alltag
Pax – Tools für den OSGi AlltagPax – Tools für den OSGi Alltag
Pax – Tools für den OSGi Alltag
 
Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?
 

Recently uploaded

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

OSGi with the Spring Framework

  • 1. Spring DM - OSGi with Spring Framework Patrick Baumgartner AD Consultant patrick.baumgartner@trivadis.com Zürich, 10.11.2009
  • 2. About me Application Development Consultant Web development with Spring Framework OSGi with Spring DM & Spring Framework Agile Software Development Certified ScrumMaster Co-Author of "OSGi in der Praxis“ Spring Dynamic Modules - OSGi with Spring Framework 2
  • 3. Agenda What is OSGi? The hard-coding Way Declarative Services Spring DM Blueprint Services Demo Conclusion Spring Dynamic Modules - OSGi with Spring Framework 3
  • 4. What is OSGi? The OSGi framework is a module system for Java that implements a complete and dynamic component model, something that does not exist in standalone Java/VM environments. […] (Source: Wikipedia) Spring Dynamic Modules - OSGi with Spring Framework 4
  • 5. Bundle Manifest – A special JAR Spring Dynamic Modules - OSGi with Spring Framework 5 Image Source: http://www.handycandy.co.uk
  • 6. Lifecycle of a Bundle Spring Dynamic Modules - OSGi with Spring Framework 6 UPDATE REFRESH INSTALL STARTING INSTALLED START UPDATE REFRESH RESOLVE EXCEPTION ACTIVE RESOLVED UNINSTALL UNINSTALL STOP STOPPING UNINSTALLED
  • 7. Service Registry Spring Dynamic Modules - OSGi with Spring Framework 7 SERVICE REGISTRY REGISTER DISCOVER SERVICE DESCRIPTION BIND SERVICE CONSUMER SERVICE PROVIDER
  • 8. OSGi – A Module System for Java Clear boundaries Dependencies Metadata Lifecycle Service Registry Spring Dynamic Modules - OSGi with Spring Framework 8
  • 9. The hard-coding Way Spring Dynamic Modules - OSGi with Spring Framework 9
  • 10. The hard-coding Way – Register a Service Register ServiceRegistration reg = bundleContext.registerService( ChatterBoxService.class.getName(), twitterChatterbox, properties); Unregister reg.unregister(); Spring Dynamic Modules - OSGi with Spring Framework 10
  • 11. The hard-coding Way – Consume a Service Get Service ServiceReference ref = bundleContext.getServiceReference( ChatterBoxService.class.getName()); ChatterBoxService chatterbox = (ChatterBoxService)bundleContext.getService(ref); Unget Service bundleContext.ungetService(ref); Spring Dynamic Modules - OSGi with Spring Framework 11
  • 12. The hard-coding Way – Consume a Service Get Service with ServiceTracker ServiceTracker tracker = new ServiceTracker( bundleContext, LogService.class.getName(), serviceTrackerCustomizer); tracker.open();LogService logService = (LogService) tracker.getService(); Spring Dynamic Modules - OSGi with Spring Framework 12
  • 13. Declarative Services Spring Dynamic Modules - OSGi with Spring Framework 13
  • 14. Declarative Services Declarative Services (DS) are part of OSGi R4 Specification – Service Compendium Declaration of components in XML OSGI-INF/<component>.xml Components provides and depend on other Services Components need a special bundle manifest headere.g. Service-Component: OSGI-INF/TwitterChatterBox.xml Spring Dynamic Modules - OSGi with Spring Framework 14
  • 15. Declarative Services <?xml version="1.0" encoding="UTF-8"?> <component name="com.trivadis.chatterbox.twitter"> <implementation class="com.trivadis.chatterbox.twitter.service.internal.TwitterChatterboxServiceImpl"/> <service> <provide interface="com.trivadis.chatterbox.service.ChatterBoxService"/> </service> <reference name="LOGGER" interface="org.osgi.service.log.LogService" cardinality="0..n" policy="dynamic" bind="addLogService" unbind="removeLogService"/> </component> Spring Dynamic Modules - OSGi with Spring Framework 15
  • 16. Spring Dynamic Modules Spring Dynamic Modules - OSGi with Spring Framework 16
  • 17. Spring Dynamic Modules Integration of Springs Dependency Injection and OSGi Formerly known as Spring OSGi XML files are located in META-INF/spring Very similar approach compared to DS Uses Spring DI for references to other Services and POJOs (Almost) no dependencies on OSGi APIs Components need a special bundle manifest headere.g. Spring-Context: META-INF/spring/bundle-context.xml, … Spring Dynamic Modules - OSGi with Spring Framework 17
  • 18. The Spring DM Idea Spring Dynamic Modules - OSGi with Spring Framework 18 APPLICATION CONTEXT APPLICATION CONTEXT APPLICATION CONTEXT Imported Service Exported Service Spring Bean SPRING & SPRING DM OSGI FRAMEWORK JVM
  • 19. Spring Dynamic Modules bundle-context.xml <beans … > <bean id="twitterChatterBox"class="com.trivadis.chatterbox.twitter.service.internal.TwitterChatterboxServiceImpl"> <property name="logService" ref="logServiceOsgi" /> </bean> </beans> Spring Dynamic Modules - OSGi with Spring Framework 19
  • 20. Spring Dynamic Modules bundle-context-osgi.xml <beans:beans …> <service ref="twitterChatterBox" interface="com.trivadis.chatterbox.service.ChatterBoxService"/> <reference id="logServiceOsgi" interface="org.osgi.service.log.LogService" /> </beans:beans> Spring Dynamic Modules - OSGi with Spring Framework 20
  • 21. Spring Dynamic Modules Also supports listeners, filters, and collections Dynamics are handled by the framework Proxies for service instances and collections Method calls are buffered Configurable timeouts Annotation-Based Injection with @ServiceReference Spring Dynamic Modules - OSGi with Spring Framework 21
  • 22. Blueprint Services Spring Dynamic Modules - OSGi with Spring Framework 22
  • 23. Blueprint Services Blueprint Services are a Standard since OSGi R 4.2 and based on the Ideas of Spring DM 1.0 Spring DM 2.0 is the Reference Implementation (RI) Apache Aries Blueprint is an other implementation Extremely similar to Spring DM but a standard XML files are located in META-INF/blueprint Components need a special bundle manifest headere.g. Bundle-Blueprint: OSGI-INF/blueprint/config.xml, … Spring Dynamic Modules - OSGi with Spring Framework 23
  • 24. Blueprint Services config.xml <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> <bean id="twitterChatterBox" class="com.trivadis.chatterbox.twitter.service.internal.TwitterChatterboxServiceImpl"> <property name="logService" ref="logService" /> </bean> <service ref="twitterChatterBox" interface="com.trivadis.chatterbox.service.ChatterBoxService" /> <reference id="logService" interface="org.osgi.service.log.LogService" /> </blueprint> Spring Dynamic Modules - OSGi with Spring Framework 24
  • 25. Comparison Spring DM vs. Blueprint Services Dependency Injection Spring Dynamic Modules - OSGi with Spring Framework 25 Spring DM Blueprint Services Constructor Injection Setter Injection Field Injection Method Injection Arbitrary Method Injection Autowiring YES YES YES YES YES YES YES YES NO NO NO NO Source: Spring Dynamic Modules Reference Guide 2.0.0.M1
  • 26. Comparison Spring DM vs. Blueprint Services Component Lifecycle Spring Dynamic Modules - OSGi with Spring Framework 26 Spring DM Blueprint Services Lazy Initialization Bean Scopes Custom Bean Scopes Built-in Callbacks Custom Callbacks Initialization Processing YES YES YES YES YES YES YES YES NO NO YES NO Source: Spring Dynamic Modules Reference Guide 2.0.0.M1
  • 27. Demo Spring Dynamic Modules - OSGi with Spring Framework 27
  • 28. Conclusion Should I use Declarative Services, Spring DM or Blueprint Services? DS, DM or Blueprint Services are better than program the life cycles and service infrastructure by hand If you already use Spring, use Spring DM If you want to use Standards use DS or Blueprint To switch from Blueprint Services to Spring DM you need just a few changes in the XML configuration. Spring Dynamic Modules - OSGi with Spring Framework 28