SlideShare a Scribd company logo
What's new in the OSGi 4.2 Enterprise Specification
                                   David Bosschaert, 2010
History
●   EEG formed early 2007
    ●   Work areas identified and work started
●   Work areas:
    ●   Distributed Services
    ●   Developer Support / Spring DM
    ●   JEE – related specifications
●   Remote Services & Blueprint specs part of 4.2
    core/compendium release summer 2009
●   Culmination of the work done in
      4.2 Enterprise Release, Q1 2010
4.2 Enterprise
                          Specification
Component Models                Naming, Management
   ●   Blueprint                   ●   JNDI
   ●   Declarative Services        ●   JMX
Distributed Services            Database Access
   ●   Remote Services             ●   JDBC
   ●   Remote Services Admin       ●   JPA
   ●   SCA Configuration Type      ●   JTA
Web Applications                Supporting Technologies
   ●   Http Service Spec           ●   Events, Config Admin, User
   ●   Web Container Spec              Admin, Trackers, ...
Blueprint
Blueprint makes developing for OSGi easier.
●   Create Blueprint Components
    ●   Based on ideas from Spring Dynamic Modules
    ●   Blueprint Component ≈ Spring DM Bean
●   Inversion of Control
●   Dependency on other components or OSGi Services
●   Register components as Services
Blueprint
                           example Bundle
component.xml                                     MyComponent.java
<blueprint xmlns="...">                           package org.example.test;
  <reference id="logSvc"
  interface="org.osgi.service.log.LogService"/>   import org.osgi.service.log.LogService;

 <bean id="myComponent"                           public class MyComponent implements MyInterface
       class="org.example.test.MyComponent"       {
       init-method="started">                       private LogService logService;
   <property name="dbURL"                           private String dbURL;
             value="jdbc:foo://bar"/>
   <property name="logService"                        public String getDbURL() {
             ref="logSvc"/>                             return dbURL;
 </bean>                                              }

  <service ref="myComponent"                          public void setDbURL(String url) {
    interface="org.example.test.MyInterface"/>          dbURL = url;
</blueprint>                                          }

                                                      public void setLogService(LogService log) {
                                                        logService = log;
Blueprint manifest header:                            }

Bundle-Blueprint: OSGI-INF/blueprint/*.xml            public void started() {
                                                        logService.log(LogService.LOG_INFO,
                                                          "MyComponent started. DB URL: " + dbURL);
                                                      }
                                                  }
Distributed OSGi
Distributed OSGi (RFC 119) split up into three specs:
●   Remote Services spec released in 4.2 Compendium
    Summer 2009
      API to expose and consume remote OSGi Services (service properties)
●   Remote Services Admin spec new in the Enterprise
    Release
      Standardizes the APIs of internal Remote Services components,
      allowing mix & match of sub-components (like Discovery)
●   SCA Configuration spec
      If you want to use SCA metadata for configuration
Remote Services
                              (in brief)
Export a service remotely:                         Import a remote service:
 ●   Add an extra service property                 ●   With Discovery
public class Activator
       implements BundleActivator {
  private ServiceRegistration reg;
                                                          automatic
 public void start(BundleContext bc) {
   Dictionary props = new Hashtable();
                                                   ●   With static
   props.put("service.exported.interfaces",
             "*");                                     <endpoint-description>   files
     // optionally, configure some details
     // for example
     props.put("service.exported.configs",
                                                   ●   All client-side proxies
               "org.apache.cxf.ws");
     props.put("org.apache.cxf.ws.address",            services have
               "http://localhost:9090/greeter");
                                                          service.imported
     reg = bc.registerService(
       GreeterService.class.getName(),
       new GreeterServiceImpl(), props);               property set.
     // Greeter Service now accessible
     // over network
 }
 …
Remote Service
                                       Admin
 Standardizes the API of components under the hood
        ●    Distribution Provider, Topology Manager, Discovery
VM1


            creates                                                                           remote
                                                                                              invocation


  Distribution                    Topology    remote     Discovery
  Distribution                    Topology    service
                                                         Discovery          network
   Provider
   Provider           instructs   Manager
                                  Manager    metadata   Component
                                                        Component




         X              listens
                                                              D
                                                              D      T
                                                                     T     DP
                                                                           DP      creates   X'
                                                                                             X'
      a service
      by some                                                            listens
      bundle
                                                                                         Service
                                                                                         Service
                                                                                          Client
                                                                                          Client
                                                                                         Bundle
                                                                                         Bundle
                                                            VM2
Web Applications
Deploy your webapps straight into an OSGi Framework
Supports .WAR and .WAB files
   ●   Deploy them just like any other bundle
   ●   .WAB primary deployment format
        –   Is a proper bundle, with BSN, package Imports & Exports, etc...
        –   Required Manifest header:
            Web-ContextPath: /myServlet

   ●   .WARs are turned into a .WAB via a URL handler, e.g.
            webbundle:file:///mywebapp.war?Web-ContextPath=/myServlet
Web Applications (2)
Support for interaction with OSGi Framework
   ●   Access to Bundle Context from within a Servlet
            BundleContext bc = (BundleContext)
                servletContext.getAttribute("osgi-bundlecontext");

   ●   Servlet Context registered in OSGi Service Registry
        –   For every successfully started Web Application
JPA
Proper database persistence for OSGi
●   Don't use static Persistence class to create an
    EntityManager
●   Look up EntityManagerFactory or
    EntityManagerFactoryBuilder in the Service Registry
●   A bundle defining Persistence Units declares this using
    the OSGi/JPA header:
      Meta-Persistence: OSGI-INF/people-persistence.xml

●   Look up Filter
      filter:    (osgi.unit.name=People)
      interface: javax.persistence.EntityManagerFactory
JPA (2)
Small example:
  EntityManagerFactory emf = … // from OSGi Service Registry

  // From here everything is familiar
  EntityManager em = emf.createEntityManager();
  em.getTransaction().begin();
  Person person = new Person();
  person.setName("David");
  em.persist(person);
  em.getTransaction().commit();
  …
JNDI
Access to OSGi from JNDI clients
   ●   Look up OSGi Services and BundleContext through JNDI osgi:
       scheme
  osgi:service/javax.sql.DataSource
  osgi:service/my_service (if service sets the osgi.jndi.service.name property)
  osgi:servicelist/javax.sql.DataSource
  osgi:framework/bundleContext

Access to JNDI for OSGi Bundles
   ●   Look up JNDI in OSGi Service Registry
        –   JNDIContextManager Service provides access JNDI Initial Context
        –   Service registry preferred over calling new InitialContext()
JTA
Provides OSGi services in the registry:
   ●   javax.transaction.UserTransaction
   ●   javax.transaction.TransactionManager
   ●   javax.transaction.TransactionSynchronizationRegistry
Supports XA Resources.
JDBC

Database Drivers registered in the OSGi Service Registry
as DataSourceFactory objects
   ●   With APIs to create
        –   javax.sql.DataSource
        –   javax.sql.ConnectionPoolDataSource
        –   javax.sql.XADataSource
        –   java.sql.Driver
JMX
●   JMX access to the OSGi Framework
    ●   Framework Control (Bundle lifecycle)
    ●   Bundle information
    ●   Service information
●   Services supported
    ●   Package Admin
    ●   Configuration Admin
    ●   Permission Admin
    ●   Initial Provisioning
    ●   User Admin
Examples?
●   Apache Aries Trader
    ●   Leverages
         –   Blueprint
         –   Web
         –   JPA / JDBC
         –   JTA
         –   JNDI
        http://incubator.apache.org/aries/ariestrader.html

●   Besides that lots of more isolated examples can be
    found in the various implementing projects.
Future EEG work
Besides refinements to current specs...
●   Subsystems & Applications
●   OBR
●   Async communications
     ●    JMS
     ●    Message Driven Components
     ●    Asynchronous Services
●   ...
Questions?

More Related Content

Viewers also liked

Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Charles Moulliard
 
RC Presentation 2 - 2016
RC Presentation 2 - 2016RC Presentation 2 - 2016
RC Presentation 2 - 2016
Gail Silverman
 
M8 acc lesson 8 0 geometry basics
M8 acc lesson 8 0 geometry basicsM8 acc lesson 8 0 geometry basics
M8 acc lesson 8 0 geometry basics
lothomas
 
Digipak &amp; poster planning (1)
Digipak &amp; poster planning (1)Digipak &amp; poster planning (1)
Digipak &amp; poster planning (1)
Reba05
 
Securitization of Intangible Assets
Securitization of Intangible AssetsSecuritization of Intangible Assets
Securitization of Intangible Assets
Aishwary Kumar Gupta
 
CarbonAds.click
CarbonAds.clickCarbonAds.click
CarbonAds.click
CarbonAds .click
 
Las células umis y mari
Las células umis y mariLas células umis y mari
Las células umis y mari
grabugnot
 
The Dark Art: Is Music Recommendation Science a Science
The Dark Art: Is Music Recommendation Science a ScienceThe Dark Art: Is Music Recommendation Science a Science
The Dark Art: Is Music Recommendation Science a Science
mpapish
 
MEDICINA VETERINARIA
MEDICINA VETERINARIAMEDICINA VETERINARIA
MEDICINA VETERINARIA
Marcela Moreno
 
A2 Media Studies - Digipak analysis
A2 Media Studies - Digipak analysisA2 Media Studies - Digipak analysis
A2 Media Studies - Digipak analysis
Gliff
 
Aula 4 agitação e mistura
Aula 4   agitação e misturaAula 4   agitação e mistura
Aula 4 agitação e mistura
Davi Fogaça
 
A2 Media Studies - Ancillary tasks(planning)
A2 Media Studies - Ancillary tasks(planning)A2 Media Studies - Ancillary tasks(planning)
A2 Media Studies - Ancillary tasks(planning)
Gliff
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBI
Gert Vanthienen
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
Claus Ibsen
 
101 lecture 2
101 lecture 2101 lecture 2
101 lecture 2
Gale Pooley
 
310 lecture 2
310 lecture 2310 lecture 2
310 lecture 2
Gale Pooley
 

Viewers also liked (17)

Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
RC Presentation 2 - 2016
RC Presentation 2 - 2016RC Presentation 2 - 2016
RC Presentation 2 - 2016
 
M8 acc lesson 8 0 geometry basics
M8 acc lesson 8 0 geometry basicsM8 acc lesson 8 0 geometry basics
M8 acc lesson 8 0 geometry basics
 
Digipak &amp; poster planning (1)
Digipak &amp; poster planning (1)Digipak &amp; poster planning (1)
Digipak &amp; poster planning (1)
 
Securitization of Intangible Assets
Securitization of Intangible AssetsSecuritization of Intangible Assets
Securitization of Intangible Assets
 
CarbonAds.click
CarbonAds.clickCarbonAds.click
CarbonAds.click
 
Las células umis y mari
Las células umis y mariLas células umis y mari
Las células umis y mari
 
The Dark Art: Is Music Recommendation Science a Science
The Dark Art: Is Music Recommendation Science a ScienceThe Dark Art: Is Music Recommendation Science a Science
The Dark Art: Is Music Recommendation Science a Science
 
MEDICINA VETERINARIA
MEDICINA VETERINARIAMEDICINA VETERINARIA
MEDICINA VETERINARIA
 
A2 Media Studies - Digipak analysis
A2 Media Studies - Digipak analysisA2 Media Studies - Digipak analysis
A2 Media Studies - Digipak analysis
 
Aula 4 agitação e mistura
Aula 4   agitação e misturaAula 4   agitação e mistura
Aula 4 agitação e mistura
 
A2 Media Studies - Ancillary tasks(planning)
A2 Media Studies - Ancillary tasks(planning)A2 Media Studies - Ancillary tasks(planning)
A2 Media Studies - Ancillary tasks(planning)
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBI
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 
101 lecture 2
101 lecture 2101 lecture 2
101 lecture 2
 
Dibujos Prehistoria
Dibujos PrehistoriaDibujos Prehistoria
Dibujos Prehistoria
 
310 lecture 2
310 lecture 2310 lecture 2
310 lecture 2
 

Similar to What's new in the OSGi 4.2 Enterprise Release

Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
mfrancis
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice Frameworks
Mohammad Asif Siddiqui
 
Beyond OSGi Software Architecture
Beyond OSGi Software ArchitectureBeyond OSGi Software Architecture
Beyond OSGi Software Architecture
Jeroen van Grondelle
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
mircodotta
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
njbartlett
 
Play with cloud foundry
Play with cloud foundryPlay with cloud foundry
Play with cloud foundry
Peng Wan
 
OSGi bootcamp - part 2
OSGi bootcamp - part 2OSGi bootcamp - part 2
OSGi bootcamp - part 2
Jan Willem Janssen
 
.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17
aminmesbahi
 
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
David Bosschaert
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
Azilen Technologies Pvt. Ltd.
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with java
DPC Consulting Ltd
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic
 
Using Service Oriented Operation and Provisioning at Financial Times
Using Service Oriented Operation and Provisioning at Financial TimesUsing Service Oriented Operation and Provisioning at Financial Times
Using Service Oriented Operation and Provisioning at Financial Times
Emeka Mosanya
 
Puppetconf2012
Puppetconf2012Puppetconf2012
Puppetconf2012
Emeka Mosanya
 
Celix, Universal OSGi?
Celix, Universal OSGi?Celix, Universal OSGi?
Celix, Universal OSGi?
abroekhuis
 
C#on linux
C#on linuxC#on linux
C#on linux
AvarinTalks
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
Oracle Korea
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
glynnormington
 
OSGi Remote Services With SCA using Apache Tuscany
OSGi Remote Services With SCA using Apache TuscanyOSGi Remote Services With SCA using Apache Tuscany
OSGi Remote Services With SCA using Apache Tuscany
Raymond Feng
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
Jupil Hwang
 

Similar to What's new in the OSGi 4.2 Enterprise Release (20)

Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice Frameworks
 
Beyond OSGi Software Architecture
Beyond OSGi Software ArchitectureBeyond OSGi Software Architecture
Beyond OSGi Software Architecture
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Play with cloud foundry
Play with cloud foundryPlay with cloud foundry
Play with cloud foundry
 
OSGi bootcamp - part 2
OSGi bootcamp - part 2OSGi bootcamp - part 2
OSGi bootcamp - part 2
 
.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17.NET Core, ASP.NET Core Course, Session 17
.NET Core, ASP.NET Core Course, Session 17
 
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)OSGi Cloud Ecosystems (OSGi Users Forum Germany)
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with java
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
 
Using Service Oriented Operation and Provisioning at Financial Times
Using Service Oriented Operation and Provisioning at Financial TimesUsing Service Oriented Operation and Provisioning at Financial Times
Using Service Oriented Operation and Provisioning at Financial Times
 
Puppetconf2012
Puppetconf2012Puppetconf2012
Puppetconf2012
 
Celix, Universal OSGi?
Celix, Universal OSGi?Celix, Universal OSGi?
Celix, Universal OSGi?
 
C#on linux
C#on linuxC#on linux
C#on linux
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
 
OSGi Remote Services With SCA using Apache Tuscany
OSGi Remote Services With SCA using Apache TuscanyOSGi Remote Services With SCA using Apache Tuscany
OSGi Remote Services With SCA using Apache Tuscany
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 

More from David Bosschaert

Node MCU Fun
Node MCU FunNode MCU Fun
Node MCU Fun
David Bosschaert
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGi
David Bosschaert
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
David Bosschaert
 
What's cool in the new and updated OSGi Specs (EclipseCon 2014)
What's cool in the new and updated OSGi Specs (EclipseCon 2014)What's cool in the new and updated OSGi Specs (EclipseCon 2014)
What's cool in the new and updated OSGi Specs (EclipseCon 2014)
David Bosschaert
 
What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)
David Bosschaert
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
David Bosschaert
 
OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)
David Bosschaert
 
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
David Bosschaert
 
OSGi Cloud Ecosystems
OSGi Cloud EcosystemsOSGi Cloud Ecosystems
OSGi Cloud Ecosystems
David Bosschaert
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
David Bosschaert
 
What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0
David Bosschaert
 
Update on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert GroupUpdate on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert Group
David Bosschaert
 
Distributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancementsDistributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancements
David Bosschaert
 
Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009
David Bosschaert
 

More from David Bosschaert (14)

Node MCU Fun
Node MCU FunNode MCU Fun
Node MCU Fun
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGi
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
 
What's cool in the new and updated OSGi Specs (EclipseCon 2014)
What's cool in the new and updated OSGi Specs (EclipseCon 2014)What's cool in the new and updated OSGi Specs (EclipseCon 2014)
What's cool in the new and updated OSGi Specs (EclipseCon 2014)
 
What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
 
OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)OSGi Cloud Ecosystems (EclipseCon 2013)
OSGi Cloud Ecosystems (EclipseCon 2013)
 
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)OSGi Enterprise Expert Group (OSGi Users Forum Germany)
OSGi Enterprise Expert Group (OSGi Users Forum Germany)
 
OSGi Cloud Ecosystems
OSGi Cloud EcosystemsOSGi Cloud Ecosystems
OSGi Cloud Ecosystems
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
 
What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0What's new in the OSGi Enterprise Release 5.0
What's new in the OSGi Enterprise Release 5.0
 
Update on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert GroupUpdate on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert Group
 
Distributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancementsDistributed Services - OSGi 4.2 and possible future enhancements
Distributed Services - OSGi 4.2 and possible future enhancements
 
Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009Distributed OSGi Demo Eclipsecon 2009
Distributed OSGi Demo Eclipsecon 2009
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 

What's new in the OSGi 4.2 Enterprise Release

  • 1. What's new in the OSGi 4.2 Enterprise Specification David Bosschaert, 2010
  • 2. History ● EEG formed early 2007 ● Work areas identified and work started ● Work areas: ● Distributed Services ● Developer Support / Spring DM ● JEE – related specifications ● Remote Services & Blueprint specs part of 4.2 core/compendium release summer 2009 ● Culmination of the work done in 4.2 Enterprise Release, Q1 2010
  • 3. 4.2 Enterprise Specification Component Models Naming, Management ● Blueprint ● JNDI ● Declarative Services ● JMX Distributed Services Database Access ● Remote Services ● JDBC ● Remote Services Admin ● JPA ● SCA Configuration Type ● JTA Web Applications Supporting Technologies ● Http Service Spec ● Events, Config Admin, User ● Web Container Spec Admin, Trackers, ...
  • 4. Blueprint Blueprint makes developing for OSGi easier. ● Create Blueprint Components ● Based on ideas from Spring Dynamic Modules ● Blueprint Component ≈ Spring DM Bean ● Inversion of Control ● Dependency on other components or OSGi Services ● Register components as Services
  • 5. Blueprint example Bundle component.xml MyComponent.java <blueprint xmlns="..."> package org.example.test; <reference id="logSvc" interface="org.osgi.service.log.LogService"/> import org.osgi.service.log.LogService; <bean id="myComponent" public class MyComponent implements MyInterface class="org.example.test.MyComponent" { init-method="started"> private LogService logService; <property name="dbURL" private String dbURL; value="jdbc:foo://bar"/> <property name="logService" public String getDbURL() { ref="logSvc"/> return dbURL; </bean> } <service ref="myComponent" public void setDbURL(String url) { interface="org.example.test.MyInterface"/> dbURL = url; </blueprint> } public void setLogService(LogService log) { logService = log; Blueprint manifest header: } Bundle-Blueprint: OSGI-INF/blueprint/*.xml public void started() { logService.log(LogService.LOG_INFO, "MyComponent started. DB URL: " + dbURL); } }
  • 6. Distributed OSGi Distributed OSGi (RFC 119) split up into three specs: ● Remote Services spec released in 4.2 Compendium Summer 2009 API to expose and consume remote OSGi Services (service properties) ● Remote Services Admin spec new in the Enterprise Release Standardizes the APIs of internal Remote Services components, allowing mix & match of sub-components (like Discovery) ● SCA Configuration spec If you want to use SCA metadata for configuration
  • 7. Remote Services (in brief) Export a service remotely: Import a remote service: ● Add an extra service property ● With Discovery public class Activator implements BundleActivator { private ServiceRegistration reg; automatic public void start(BundleContext bc) { Dictionary props = new Hashtable(); ● With static props.put("service.exported.interfaces", "*"); <endpoint-description> files // optionally, configure some details // for example props.put("service.exported.configs", ● All client-side proxies "org.apache.cxf.ws"); props.put("org.apache.cxf.ws.address", services have "http://localhost:9090/greeter"); service.imported reg = bc.registerService( GreeterService.class.getName(), new GreeterServiceImpl(), props); property set. // Greeter Service now accessible // over network } …
  • 8. Remote Service Admin Standardizes the API of components under the hood ● Distribution Provider, Topology Manager, Discovery VM1 creates remote invocation Distribution Topology remote Discovery Distribution Topology service Discovery network Provider Provider instructs Manager Manager metadata Component Component X listens D D T T DP DP creates X' X' a service by some listens bundle Service Service Client Client Bundle Bundle VM2
  • 9. Web Applications Deploy your webapps straight into an OSGi Framework Supports .WAR and .WAB files ● Deploy them just like any other bundle ● .WAB primary deployment format – Is a proper bundle, with BSN, package Imports & Exports, etc... – Required Manifest header: Web-ContextPath: /myServlet ● .WARs are turned into a .WAB via a URL handler, e.g. webbundle:file:///mywebapp.war?Web-ContextPath=/myServlet
  • 10. Web Applications (2) Support for interaction with OSGi Framework ● Access to Bundle Context from within a Servlet BundleContext bc = (BundleContext) servletContext.getAttribute("osgi-bundlecontext"); ● Servlet Context registered in OSGi Service Registry – For every successfully started Web Application
  • 11. JPA Proper database persistence for OSGi ● Don't use static Persistence class to create an EntityManager ● Look up EntityManagerFactory or EntityManagerFactoryBuilder in the Service Registry ● A bundle defining Persistence Units declares this using the OSGi/JPA header: Meta-Persistence: OSGI-INF/people-persistence.xml ● Look up Filter filter: (osgi.unit.name=People) interface: javax.persistence.EntityManagerFactory
  • 12. JPA (2) Small example: EntityManagerFactory emf = … // from OSGi Service Registry // From here everything is familiar EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); Person person = new Person(); person.setName("David"); em.persist(person); em.getTransaction().commit(); …
  • 13. JNDI Access to OSGi from JNDI clients ● Look up OSGi Services and BundleContext through JNDI osgi: scheme osgi:service/javax.sql.DataSource osgi:service/my_service (if service sets the osgi.jndi.service.name property) osgi:servicelist/javax.sql.DataSource osgi:framework/bundleContext Access to JNDI for OSGi Bundles ● Look up JNDI in OSGi Service Registry – JNDIContextManager Service provides access JNDI Initial Context – Service registry preferred over calling new InitialContext()
  • 14. JTA Provides OSGi services in the registry: ● javax.transaction.UserTransaction ● javax.transaction.TransactionManager ● javax.transaction.TransactionSynchronizationRegistry Supports XA Resources.
  • 15. JDBC Database Drivers registered in the OSGi Service Registry as DataSourceFactory objects ● With APIs to create – javax.sql.DataSource – javax.sql.ConnectionPoolDataSource – javax.sql.XADataSource – java.sql.Driver
  • 16. JMX ● JMX access to the OSGi Framework ● Framework Control (Bundle lifecycle) ● Bundle information ● Service information ● Services supported ● Package Admin ● Configuration Admin ● Permission Admin ● Initial Provisioning ● User Admin
  • 17. Examples? ● Apache Aries Trader ● Leverages – Blueprint – Web – JPA / JDBC – JTA – JNDI http://incubator.apache.org/aries/ariestrader.html ● Besides that lots of more isolated examples can be found in the various implementing projects.
  • 18. Future EEG work Besides refinements to current specs... ● Subsystems & Applications ● OBR ● Async communications ● JMS ● Message Driven Components ● Asynchronous Services ● ...