SlideShare una empresa de Scribd logo
1 de 43
OSGi Release 4.2



        Roman Roelofsen
         Lead Architect

              @

                
OSGi Release 4.2
    ●   Released 16.09.2009
    ●   Änderungen Core
        –   Bugfixes
        –   Permissions, Service Hooks, Framework
            Launching
    ●   Änderungen Compendium
        –   Bugfixes
        –   Diverse neue *-Specification
    ●   Implementierungen
                                 
        –   Apache Felix 2.0, Eclipse Equinox 3.5, ...
OSGi Notation

    Bundle A

        registerService



                          addServiceListener
                                               Bundle C




        getService

 
    Bundle B                
Änderungen Core




            
Multiple Service
              Provider Separation
    ●   Problem 1




                            
Multiple Service
              Provider Separation
    ●   Problem 2




                            
Multiple Service
              Provider Separation
    ●   Problem 3




                            
Multiple Service
                Provider Separation
    ●   Mögliche Lösungen
        –   Services unter verschiedenen Class-Namen
            registrieren
        –   ServiceFactories um das Client Bundle zu
            identifizieren
        –   ServicePermission erweitern

        –   Verschiedene Package Namen vergeben
        –   BSN im Import-Package verwenden
        –   PackagePermission erweitern
                               
Multiple Service
                Provider Separation
    ●   Mögliche Lösungen
        –   Services unter verschiedenen Class-Namen
            registrieren
        –   ServiceFactories um das Client Bundle zu
            identifizieren
        –   ServicePermission erweitern

        –   Verschiedene Package Namen vergeben
        –   BSN im Import-Package verwenden
        –   PackagePermission erweitern
                               
Multiple Service
                  Provider Separation

    ●   ServicePermission
        –   ServicePermission("(location=https://www.acme.com/*)",
                              GET )
        –   Mögliche Filter keys
             ● id – Bundle ID
             ● location -Bundle Location


             ● Signer – Bundle Signer


             ● name – Bundle symbolic name


             ● @whatever – Service property 'whatever'

                                        
Multiple Service
                  Provider Separation

    ●   PackagePermission
        –   PackagePermission("(location=http://www.acme.com/*",
                              IMPORT)
        –   Mögliche Filter keys
             ● id – Bundle ID
             ● location -Bundle Location


             ● Signer – Bundle Signer


             ● name – Bundle symbolic name


                                       
Multiple Service
                Provider Separation



    ●   Sehr mächtiges Konzept
        –   Application Model, …

    ●   Setzt Java Security voraus!



                                
DENY Permission



    ●   Problem
        –   Ohne Java Security: alles erlaubt
        –   Mit Java Security: Alles verboten, explizite
            Freigaben
        –   Sperren von bestimmten Services kaum
            möglich

                                  
DENY Permission


    ●    Lösung
          –   DENY Permission

DENY {
        [ ..BundleSignerCondition "* ; o=ACME" "!" ]
        ( ..PackagePermission "com.acme.secret.*"
                             "import,exportonly" )
}
                                    
Service Hooks Specification


    ●   Service Modell OSGi <= 4.1
        –   Services
             ● Register
             ● Unregister


             ● Find


             ● Get


        –   ServiceListener
             ●   Statusänderungen
                                 
Service Hooks Specification




    ●   Service Hooks OSGi 4.2
        –   FindHook (getServiceReference)
        –   EventHook (Service Events)
        –   ListenerHook (ServiceListener)


                                 
Service Hooks Specification




                  
Service Hooks Specification




    ●   API
        –   context.registerService(ListenerHook.class.getName(),
                                    hook, null);




                                      
Framework Launching


    ●   Standardisierte API zum Starten von OSGi
        Frameworks
        –   Starten/Stoppen
        –   Konfigurationen
             ●   z.B. org.osgi.framework.system.packages

    ●   Nützlich falls ein Framework in eine Anwendung
        eingebettet werden soll
                                  
Framework Launching
Map p = new HashMap();
p.put( "org.osgi.framework.system.packages", "...");

FrameworkFactory factory = (FrameworkFactory)
                           Class.forName( factoryName )
                           .newInstance();

Framework framework = factory.newFramework(p);
framework.init();

BundleContext context = framework.getBundleContext();
context.installBundle( "..." );

framework.start();
framework.waitForStop();
                                   
Änderungen Compendium




               
Remote Services


    ●   Ehemals „Distributed OSGi“
    ●   Spezifiziert Konfigurationsparameter und
        Semantik um Endpoints basierend auf Services
        zu erstellen
        –   Es wird kein konkretes Protokoll verwendet
    ●   RPC-orientiert
        –   SOAP, RMI, CORBA, …
        –   Nicht: JMS, MOMs, ...
                                 
Remote Services




            
Remote Services


                                                               End
    Bundle A                                    DSW            point




     service.exported.interfaces = *
     service.exported.intents = confidentiality.message.body
     service.exported.configs = net.soap

                                          
Remote Services


    End
    point        DSW                                   Bundle B




             service.imported = <<some value>>
             service.intends = confidentiality.message.body
             service.imported.configs = net.soap
                             
Remote Services




            
Remote Services
   ●   Discovery
        –   Protokoll-spezifisch, oder
        –   Statisch OSGI-INF/remote-service/serviceA.xml
<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
         <service-description>

                 <provide interface="remoting.api.RemoteService" />
                 <property name="osgi.remote.interfaces">*</property>
                 <property name="osgi.remote.configuration.type">pojo</property>
                 <property name="osgi.remote.configuration.pojo.address">
                         http://localhost:9090/remoteService
                 </property>

         </service-description>
</service-descriptions>
                                         
Blueprint Container Spec.


    ●   Dependency Injection Container
    ●   Basiert auf den Konzepten von Spring/Spring-DM
        –   Diverse Erweiterung wurden im Rahmen der
            Spezifizierung vorgenommen
        –   Referenzimplementierung: Spring-DM
        –   Zusätzlich: Apache Geronimo Blueprint
             IBM, Progress, …
             ●


    ●   „Pimp my DS“
                                
Blueprint Container Spec.




                 
Blueprint Container Spec.
     ●   Services registrieren
<blueprint>

          <service id="echoService" interface="com.acme.Echo" ref="echo"/>

          <bean id="echo" class="com.acme.EchoImpl">
                  <property name="propName" value="Value"/>
          </bean>

</blueprint>




                                      
Blueprint Container Spec.
     ●   Services konsumieren
<blueprint>

          <reference     id=“echoService“
                         interface=“com.acme.Echo“
                         filter=“(...)“
                         />

          <bean id="echoClient" class="com.acme.EchoClient">
                  <property name="echoService" ref=“echoService“ />
          </bean>

</blueprint>

                                      
Blueprint Container Spec.
     ●   Service Ref List
<blueprint>

          <bean id="listener" class="..." />

          <ref-list interface=“....IService“>
                   <reference-listener       ref=“listener“
                                             bind-method=“bind“
                                             unbind-method=“unbind“
                                             />
          </ref-list>

</blueprint>

                                          
Blueprint Container Spec.
    ●   Service Proxies
                                                Service Impl 1

                           Service
        Bean
                            Ref                 Service Impl 2

                                                Service Impl 3




               •Proxy zum Service
               •Wird automatisch ausgetauscht
                                  
Blueprint Container Spec.
    ●   Service Ref Lists
                                                      Service Impl 1
                            Service
        Bean                 Ref                      Service Impl 2
                             List

                                                      Service Impl 3




                •Service Liste
                •Verändert sich automatisch
                •Repräsentiert immer die aktuellen Services
                                    
Blueprint Container Spec.
    ●   Blueprint Events
            –   CREATING, CREATED, …

    ●   Framework Unterstützung (Apache Felix Karaf)
            ID State       Blueprint    Level Name
        [    0] [Active   ][           ] [ 0] System Bundle (1.9.0.SNAPSHOT)
        [    1] [Active   ] [Created   ] [ 30] Apache Felix Karaf :: GShell ...
        [    2] [Active   ] [Created   ] [ 30] Apache Felix Karaf :: GShell ...
        [    3] [Active   ] [Created   ] [ 30] Apache Felix Karaf :: Spring ...




    ●   Ausblick
            –   Custom Namespaces
 
            –   ConfigAdmin Unterstützung
                                   
Declarative Services Update


    ●   Service-Component Header unterstützt
        Wildcards
        –   Service-Component: OSGI-INF/*.xml

    ●   Name Attribute von component ist optional

    ●   Fehlermeldungen von DS mit dem LogService
        werden über den BundleContext des User-
        Bundle erzeugt
                                
Declarative Services Update

    ●   Signatur von bind/unbind OSGi <= 4.1
        protected void <method-name>(ServiceReference);
        protected void <method-name>(<parameter-type>);



    ●   Signatur von bind/unbind OSGi 4.2
        protected void <method-name>(ServiceReference);
        protected void <method-name>(<parameter-type>);
        protected void <method-name>(<parameter-type>, Map);


                                   
Declarative Services Tipps
    ●   XML Generierung mit BND
        –   Deklarativ
             ●   Service-Component=aQute.tutorial.component.World; 
                                log=org.osgi.service.log.LogService

        –   Annotation
                  @Component
             ●
                  public class AnnotatedComponent {

                      LogService log;

                      @Reference
                      void setLog(LogService log) { this.log=log; }

                  }                      
Declarative Services Tipps


    ●   XML Generierung mit maven-scr-plugin
        –   Serviceabhängigkeiten werden in JavaDoc
            Kommentaren eingetragen
            /**
             * @scr.component
             */
            public class Component {

                /**
                 * @scr.reference
                 */
                LogService log;

            }
                                     
Bundle Tracker
    ●   ServiceTracker Spec → Tracker Spec
    ●   Tracker Spec
         –   Service Tracker
         –   Bundle Tracker

    ●   API
    ●   BundleTracker(BundleContext,int,BundleTrackerCustomizer)
         –   addingBundle(Bundle,BundleEvent)
         –   modifiedBundle(Bundle,BundleEvent,Object)
         –   removedBundle(Bundle,BundleEvent,Object)
                                     
    ●   bundleTracker.open()
Ausblick OSGi Enterprise


    ●   JDBC Database Access
    ●   JTA Transactions
    ●   JMX
    ●   JNDI
    ●   JPA



                            
Vielen Dank für
    Ihre Aufmerksamkeit!


          Fragen?

                         Roman Roelofsen
              
                 r.roelofsen@prosyst.com
     

Más contenido relacionado

Destacado

הפסדים ורווחי אנרגיה
הפסדים ורווחי אנרגיההפסדים ורווחי אנרגיה
הפסדים ורווחי אנרגיהIlan Langer
 
Using Social Media for Student Gradutates
Using Social Media for Student GradutatesUsing Social Media for Student Gradutates
Using Social Media for Student GradutatesSian Jamieson
 
Numai in unele tari
Numai in unele tariNumai in unele tari
Numai in unele tariaviaxis
 
Mobile and Social Networks 23/11/2007
Mobile and Social Networks  23/11/2007Mobile and Social Networks  23/11/2007
Mobile and Social Networks 23/11/2007Luigi Greco
 
Responsive Research: how trying to meet contextual needs dictated my research...
Responsive Research: how trying to meet contextual needs dictated my research...Responsive Research: how trying to meet contextual needs dictated my research...
Responsive Research: how trying to meet contextual needs dictated my research...Guzel Gunler Poliklinigi
 
PresentacióN Vqv1
PresentacióN Vqv1PresentacióN Vqv1
PresentacióN Vqv1guest084457
 
A+ Update Endpoint Encryption
A+ Update Endpoint EncryptionA+ Update Endpoint Encryption
A+ Update Endpoint EncryptionOSU - East
 
Nuclear Developments Across Europe Wk
Nuclear Developments Across Europe WkNuclear Developments Across Europe Wk
Nuclear Developments Across Europe Wkweerokoster
 
כפר השלום
כפר השלוםכפר השלום
כפר השלוםIlan Langer
 
GelişImsel Psikopatoloji Klinikte 2.BöLüM
GelişImsel Psikopatoloji Klinikte 2.BöLüMGelişImsel Psikopatoloji Klinikte 2.BöLüM
GelişImsel Psikopatoloji Klinikte 2.BöLüMGuzel Gunler Poliklinigi
 
Prognosis : Your Diagnosis
Prognosis : Your DiagnosisPrognosis : Your Diagnosis
Prognosis : Your DiagnosisNayana Somaratna
 
Crowdfunding for Social Enterprises
Crowdfunding for Social EnterprisesCrowdfunding for Social Enterprises
Crowdfunding for Social EnterprisesSian Jamieson
 
RSS Exhibitors Forum Marketing Special
RSS Exhibitors Forum Marketing SpecialRSS Exhibitors Forum Marketing Special
RSS Exhibitors Forum Marketing SpecialSian Jamieson
 
Highland Museum Forum Visitors Survey 2012
Highland Museum Forum Visitors Survey 2012Highland Museum Forum Visitors Survey 2012
Highland Museum Forum Visitors Survey 2012Sian Jamieson
 
Crowdfunding Presentation by HI-Arts, Stornoway
Crowdfunding Presentation by HI-Arts, StornowayCrowdfunding Presentation by HI-Arts, Stornoway
Crowdfunding Presentation by HI-Arts, StornowaySian Jamieson
 
Gandire Economica
Gandire EconomicaGandire Economica
Gandire Economicaaviaxis
 
HMF Emarketing Workshop
HMF Emarketing WorkshopHMF Emarketing Workshop
HMF Emarketing WorkshopSian Jamieson
 
Google apps and Python para Python Brasil [7]
Google apps and Python para Python Brasil [7]Google apps and Python para Python Brasil [7]
Google apps and Python para Python Brasil [7]Eduardo Maçan
 

Destacado (20)

הפסדים ורווחי אנרגיה
הפסדים ורווחי אנרגיההפסדים ורווחי אנרגיה
הפסדים ורווחי אנרגיה
 
Using Social Media for Student Gradutates
Using Social Media for Student GradutatesUsing Social Media for Student Gradutates
Using Social Media for Student Gradutates
 
Numai in unele tari
Numai in unele tariNumai in unele tari
Numai in unele tari
 
Mobile and Social Networks 23/11/2007
Mobile and Social Networks  23/11/2007Mobile and Social Networks  23/11/2007
Mobile and Social Networks 23/11/2007
 
Responsive Research: how trying to meet contextual needs dictated my research...
Responsive Research: how trying to meet contextual needs dictated my research...Responsive Research: how trying to meet contextual needs dictated my research...
Responsive Research: how trying to meet contextual needs dictated my research...
 
PresentacióN Vqv1
PresentacióN Vqv1PresentacióN Vqv1
PresentacióN Vqv1
 
A+ Update Endpoint Encryption
A+ Update Endpoint EncryptionA+ Update Endpoint Encryption
A+ Update Endpoint Encryption
 
Nuclear Developments Across Europe Wk
Nuclear Developments Across Europe WkNuclear Developments Across Europe Wk
Nuclear Developments Across Europe Wk
 
כפר השלום
כפר השלוםכפר השלום
כפר השלום
 
GelişImsel Psikopatoloji Klinikte 2.BöLüM
GelişImsel Psikopatoloji Klinikte 2.BöLüMGelişImsel Psikopatoloji Klinikte 2.BöLüM
GelişImsel Psikopatoloji Klinikte 2.BöLüM
 
Prognosis : Your Diagnosis
Prognosis : Your DiagnosisPrognosis : Your Diagnosis
Prognosis : Your Diagnosis
 
Crowdfunding for Social Enterprises
Crowdfunding for Social EnterprisesCrowdfunding for Social Enterprises
Crowdfunding for Social Enterprises
 
RSS Exhibitors Forum Marketing Special
RSS Exhibitors Forum Marketing SpecialRSS Exhibitors Forum Marketing Special
RSS Exhibitors Forum Marketing Special
 
Highland Museum Forum Visitors Survey 2012
Highland Museum Forum Visitors Survey 2012Highland Museum Forum Visitors Survey 2012
Highland Museum Forum Visitors Survey 2012
 
Crowdfunding Presentation by HI-Arts, Stornoway
Crowdfunding Presentation by HI-Arts, StornowayCrowdfunding Presentation by HI-Arts, Stornoway
Crowdfunding Presentation by HI-Arts, Stornoway
 
One Piece 549
One Piece 549One Piece 549
One Piece 549
 
Gandire Economica
Gandire EconomicaGandire Economica
Gandire Economica
 
HMF Emarketing Workshop
HMF Emarketing WorkshopHMF Emarketing Workshop
HMF Emarketing Workshop
 
Odev zamani 28.04.12
Odev zamani 28.04.12Odev zamani 28.04.12
Odev zamani 28.04.12
 
Google apps and Python para Python Brasil [7]
Google apps and Python para Python Brasil [7]Google apps and Python para Python Brasil [7]
Google apps and Python para Python Brasil [7]
 

Similar a OSGi Release 4.2 - Was ist neu?

ANEO | Automatisierung mit RedHat Ansible
ANEO | Automatisierung mit RedHat AnsibleANEO | Automatisierung mit RedHat Ansible
ANEO | Automatisierung mit RedHat AnsibleCarolineAuerMarcher
 
Server Revolutions- Der Spring Source DM Server
Server Revolutions- Der Spring Source DM ServerServer Revolutions- Der Spring Source DM Server
Server Revolutions- Der Spring Source DM ServerSandro Sonntag
 
JSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael GreifenederJSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael GreifenederChristoph Pickl
 
Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10
Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10
Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10Ralf Sigmund
 
Grundlagen puppet
Grundlagen puppetGrundlagen puppet
Grundlagen puppetinovex GmbH
 
Icinga 2009 at Nagios Workshop
Icinga 2009 at Nagios WorkshopIcinga 2009 at Nagios Workshop
Icinga 2009 at Nagios WorkshopIcinga
 
DACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdfDACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdfDNUG e.V.
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysQAware GmbH
 
Vagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenVagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenOPITZ CONSULTING Deutschland
 
node.js - Eine kurze Einführung
node.js - Eine kurze Einführungnode.js - Eine kurze Einführung
node.js - Eine kurze Einführungnodeio
 
Scala - OSGi Bundles from Outer (Java) Space
Scala - OSGi Bundles from Outer (Java) SpaceScala - OSGi Bundles from Outer (Java) Space
Scala - OSGi Bundles from Outer (Java) SpaceOliver Braun
 
Schlanke Webarchitekturen nicht nur mit JSF 2 und CDI
Schlanke Webarchitekturen nicht nur mit JSF 2 und CDISchlanke Webarchitekturen nicht nur mit JSF 2 und CDI
Schlanke Webarchitekturen nicht nur mit JSF 2 und CDIadesso AG
 
Opensource Tools für das Data Center Management
Opensource Tools für das Data Center ManagementOpensource Tools für das Data Center Management
Opensource Tools für das Data Center Managementinovex GmbH
 
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Torsten Kleiber
 
System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...Digicomp Academy AG
 
Zeitnahe Reaktion auf Verordnungsänderungen mit Feature Toggles
Zeitnahe Reaktion auf Verordnungsänderungen mit Feature TogglesZeitnahe Reaktion auf Verordnungsänderungen mit Feature Toggles
Zeitnahe Reaktion auf Verordnungsänderungen mit Feature TogglesBATbern
 
Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?Josef Adersberger
 

Similar a OSGi Release 4.2 - Was ist neu? (20)

ANEO | Automatisierung mit RedHat Ansible
ANEO | Automatisierung mit RedHat AnsibleANEO | Automatisierung mit RedHat Ansible
ANEO | Automatisierung mit RedHat Ansible
 
Server Revolutions- Der Spring Source DM Server
Server Revolutions- Der Spring Source DM ServerServer Revolutions- Der Spring Source DM Server
Server Revolutions- Der Spring Source DM Server
 
JSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael GreifenederJSUG - OSGi by Michael Greifeneder
JSUG - OSGi by Michael Greifeneder
 
GWT – Google Web Toolkit in der Praxis
GWT – Google Web Toolkit in der PraxisGWT – Google Web Toolkit in der Praxis
GWT – Google Web Toolkit in der Praxis
 
Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10
Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10
Wjax integrationsprojekte auf dem weg zur continuous delivery 2011 11-10
 
Grundlagen puppet
Grundlagen puppetGrundlagen puppet
Grundlagen puppet
 
Icinga 2009 at Nagios Workshop
Icinga 2009 at Nagios WorkshopIcinga 2009 at Nagios Workshop
Icinga 2009 at Nagios Workshop
 
DACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdfDACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdf
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API Gateways
 
Vagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und ArchitektenVagrant, Puppet, Docker für Entwickler und Architekten
Vagrant, Puppet, Docker für Entwickler und Architekten
 
Fehleranalyse in SCCM
Fehleranalyse in SCCMFehleranalyse in SCCM
Fehleranalyse in SCCM
 
node.js - Eine kurze Einführung
node.js - Eine kurze Einführungnode.js - Eine kurze Einführung
node.js - Eine kurze Einführung
 
SOA Suite 12c aus der Infrastruktur-Sicht
SOA Suite 12c aus der Infrastruktur-SichtSOA Suite 12c aus der Infrastruktur-Sicht
SOA Suite 12c aus der Infrastruktur-Sicht
 
Scala - OSGi Bundles from Outer (Java) Space
Scala - OSGi Bundles from Outer (Java) SpaceScala - OSGi Bundles from Outer (Java) Space
Scala - OSGi Bundles from Outer (Java) Space
 
Schlanke Webarchitekturen nicht nur mit JSF 2 und CDI
Schlanke Webarchitekturen nicht nur mit JSF 2 und CDISchlanke Webarchitekturen nicht nur mit JSF 2 und CDI
Schlanke Webarchitekturen nicht nur mit JSF 2 und CDI
 
Opensource Tools für das Data Center Management
Opensource Tools für das Data Center ManagementOpensource Tools für das Data Center Management
Opensource Tools für das Data Center Management
 
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
Das dreckige Dutzend - ADF Migration nach 12c in der IKB - DOAG 2014.
 
System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...
 
Zeitnahe Reaktion auf Verordnungsänderungen mit Feature Toggles
Zeitnahe Reaktion auf Verordnungsänderungen mit Feature TogglesZeitnahe Reaktion auf Verordnungsänderungen mit Feature Toggles
Zeitnahe Reaktion auf Verordnungsänderungen mit Feature Toggles
 
Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?
 

Más de Roman Roelofsen

Agile specifications on agile projects
Agile specifications on agile projectsAgile specifications on agile projects
Agile specifications on agile projectsRoman Roelofsen
 
Webanwendungen mit Apache HBase entwickeln
Webanwendungen mit Apache HBase entwickelnWebanwendungen mit Apache HBase entwickeln
Webanwendungen mit Apache HBase entwickelnRoman Roelofsen
 
Pro Syst Enterprise OSGi
Pro Syst Enterprise OSGiPro Syst Enterprise OSGi
Pro Syst Enterprise OSGiRoman Roelofsen
 
VIB - Very Important Bundles
VIB - Very Important BundlesVIB - Very Important Bundles
VIB - Very Important BundlesRoman Roelofsen
 

Más de Roman Roelofsen (6)

Agile specifications on agile projects
Agile specifications on agile projectsAgile specifications on agile projects
Agile specifications on agile projects
 
Ajax, Comet & Co.
Ajax, Comet & Co.Ajax, Comet & Co.
Ajax, Comet & Co.
 
Concurrency Paradigmen
Concurrency ParadigmenConcurrency Paradigmen
Concurrency Paradigmen
 
Webanwendungen mit Apache HBase entwickeln
Webanwendungen mit Apache HBase entwickelnWebanwendungen mit Apache HBase entwickeln
Webanwendungen mit Apache HBase entwickeln
 
Pro Syst Enterprise OSGi
Pro Syst Enterprise OSGiPro Syst Enterprise OSGi
Pro Syst Enterprise OSGi
 
VIB - Very Important Bundles
VIB - Very Important BundlesVIB - Very Important Bundles
VIB - Very Important Bundles
 

OSGi Release 4.2 - Was ist neu?

  • 1. OSGi Release 4.2 Roman Roelofsen Lead Architect @    
  • 2. OSGi Release 4.2 ● Released 16.09.2009 ● Änderungen Core – Bugfixes – Permissions, Service Hooks, Framework Launching ● Änderungen Compendium – Bugfixes – Diverse neue *-Specification ● Implementierungen     – Apache Felix 2.0, Eclipse Equinox 3.5, ...
  • 3. OSGi Notation Bundle A registerService addServiceListener Bundle C getService   Bundle B  
  • 5. Multiple Service Provider Separation ● Problem 1    
  • 6. Multiple Service Provider Separation ● Problem 2    
  • 7. Multiple Service Provider Separation ● Problem 3    
  • 8. Multiple Service Provider Separation ● Mögliche Lösungen – Services unter verschiedenen Class-Namen registrieren – ServiceFactories um das Client Bundle zu identifizieren – ServicePermission erweitern – Verschiedene Package Namen vergeben – BSN im Import-Package verwenden   – PackagePermission erweitern  
  • 9. Multiple Service Provider Separation ● Mögliche Lösungen – Services unter verschiedenen Class-Namen registrieren – ServiceFactories um das Client Bundle zu identifizieren – ServicePermission erweitern – Verschiedene Package Namen vergeben – BSN im Import-Package verwenden   – PackagePermission erweitern  
  • 10. Multiple Service Provider Separation ● ServicePermission – ServicePermission("(location=https://www.acme.com/*)", GET ) – Mögliche Filter keys ● id – Bundle ID ● location -Bundle Location ● Signer – Bundle Signer ● name – Bundle symbolic name ● @whatever – Service property 'whatever'    
  • 11. Multiple Service Provider Separation ● PackagePermission – PackagePermission("(location=http://www.acme.com/*", IMPORT) – Mögliche Filter keys ● id – Bundle ID ● location -Bundle Location ● Signer – Bundle Signer ● name – Bundle symbolic name    
  • 12. Multiple Service Provider Separation ● Sehr mächtiges Konzept – Application Model, … ● Setzt Java Security voraus!    
  • 13. DENY Permission ● Problem – Ohne Java Security: alles erlaubt – Mit Java Security: Alles verboten, explizite Freigaben – Sperren von bestimmten Services kaum möglich    
  • 14. DENY Permission ● Lösung – DENY Permission DENY { [ ..BundleSignerCondition "* ; o=ACME" "!" ] ( ..PackagePermission "com.acme.secret.*" "import,exportonly" ) }    
  • 15. Service Hooks Specification ● Service Modell OSGi <= 4.1 – Services ● Register ● Unregister ● Find ● Get – ServiceListener ● Statusänderungen    
  • 16. Service Hooks Specification ● Service Hooks OSGi 4.2 – FindHook (getServiceReference) – EventHook (Service Events) – ListenerHook (ServiceListener)    
  • 18. Service Hooks Specification ● API – context.registerService(ListenerHook.class.getName(), hook, null);    
  • 19. Framework Launching ● Standardisierte API zum Starten von OSGi Frameworks – Starten/Stoppen – Konfigurationen ● z.B. org.osgi.framework.system.packages ● Nützlich falls ein Framework in eine Anwendung eingebettet werden soll    
  • 20. Framework Launching Map p = new HashMap(); p.put( "org.osgi.framework.system.packages", "..."); FrameworkFactory factory = (FrameworkFactory) Class.forName( factoryName ) .newInstance(); Framework framework = factory.newFramework(p); framework.init(); BundleContext context = framework.getBundleContext(); context.installBundle( "..." ); framework.start(); framework.waitForStop();    
  • 22. Remote Services ● Ehemals „Distributed OSGi“ ● Spezifiziert Konfigurationsparameter und Semantik um Endpoints basierend auf Services zu erstellen – Es wird kein konkretes Protokoll verwendet ● RPC-orientiert – SOAP, RMI, CORBA, … – Nicht: JMS, MOMs, ...    
  • 24. Remote Services End Bundle A DSW point service.exported.interfaces = * service.exported.intents = confidentiality.message.body service.exported.configs = net.soap    
  • 25. Remote Services End point DSW Bundle B service.imported = <<some value>> service.intends = confidentiality.message.body service.imported.configs = net.soap    
  • 27. Remote Services ● Discovery – Protokoll-spezifisch, oder – Statisch OSGI-INF/remote-service/serviceA.xml <service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0"> <service-description> <provide interface="remoting.api.RemoteService" /> <property name="osgi.remote.interfaces">*</property> <property name="osgi.remote.configuration.type">pojo</property> <property name="osgi.remote.configuration.pojo.address"> http://localhost:9090/remoteService </property> </service-description> </service-descriptions>    
  • 28. Blueprint Container Spec. ● Dependency Injection Container ● Basiert auf den Konzepten von Spring/Spring-DM – Diverse Erweiterung wurden im Rahmen der Spezifizierung vorgenommen – Referenzimplementierung: Spring-DM – Zusätzlich: Apache Geronimo Blueprint IBM, Progress, … ● ● „Pimp my DS“    
  • 30. Blueprint Container Spec. ● Services registrieren <blueprint> <service id="echoService" interface="com.acme.Echo" ref="echo"/> <bean id="echo" class="com.acme.EchoImpl"> <property name="propName" value="Value"/> </bean> </blueprint>    
  • 31. Blueprint Container Spec. ● Services konsumieren <blueprint> <reference id=“echoService“ interface=“com.acme.Echo“ filter=“(...)“ /> <bean id="echoClient" class="com.acme.EchoClient"> <property name="echoService" ref=“echoService“ /> </bean> </blueprint>    
  • 32. Blueprint Container Spec. ● Service Ref List <blueprint> <bean id="listener" class="..." /> <ref-list interface=“....IService“> <reference-listener ref=“listener“ bind-method=“bind“ unbind-method=“unbind“ /> </ref-list> </blueprint>    
  • 33. Blueprint Container Spec. ● Service Proxies Service Impl 1 Service Bean Ref Service Impl 2 Service Impl 3 •Proxy zum Service   •Wird automatisch ausgetauscht  
  • 34. Blueprint Container Spec. ● Service Ref Lists Service Impl 1 Service Bean Ref Service Impl 2 List Service Impl 3 •Service Liste •Verändert sich automatisch   •Repräsentiert immer die aktuellen Services  
  • 35. Blueprint Container Spec. ● Blueprint Events – CREATING, CREATED, … ● Framework Unterstützung (Apache Felix Karaf) ID State Blueprint Level Name [ 0] [Active ][ ] [ 0] System Bundle (1.9.0.SNAPSHOT) [ 1] [Active ] [Created ] [ 30] Apache Felix Karaf :: GShell ... [ 2] [Active ] [Created ] [ 30] Apache Felix Karaf :: GShell ... [ 3] [Active ] [Created ] [ 30] Apache Felix Karaf :: Spring ... ● Ausblick – Custom Namespaces   – ConfigAdmin Unterstützung  
  • 36. Declarative Services Update ● Service-Component Header unterstützt Wildcards – Service-Component: OSGI-INF/*.xml ● Name Attribute von component ist optional ● Fehlermeldungen von DS mit dem LogService werden über den BundleContext des User- Bundle erzeugt    
  • 37. Declarative Services Update ● Signatur von bind/unbind OSGi <= 4.1 protected void <method-name>(ServiceReference); protected void <method-name>(<parameter-type>); ● Signatur von bind/unbind OSGi 4.2 protected void <method-name>(ServiceReference); protected void <method-name>(<parameter-type>); protected void <method-name>(<parameter-type>, Map);    
  • 38. Declarative Services Tipps ● XML Generierung mit BND – Deklarativ ● Service-Component=aQute.tutorial.component.World; log=org.osgi.service.log.LogService – Annotation @Component ● public class AnnotatedComponent { LogService log; @Reference void setLog(LogService log) { this.log=log; }   }  
  • 39. Declarative Services Tipps ● XML Generierung mit maven-scr-plugin – Serviceabhängigkeiten werden in JavaDoc Kommentaren eingetragen /** * @scr.component */ public class Component { /** * @scr.reference */ LogService log; }    
  • 40. Bundle Tracker ● ServiceTracker Spec → Tracker Spec ● Tracker Spec – Service Tracker – Bundle Tracker ● API ● BundleTracker(BundleContext,int,BundleTrackerCustomizer) – addingBundle(Bundle,BundleEvent) – modifiedBundle(Bundle,BundleEvent,Object) – removedBundle(Bundle,BundleEvent,Object)     ● bundleTracker.open()
  • 41. Ausblick OSGi Enterprise ● JDBC Database Access ● JTA Transactions ● JMX ● JNDI ● JPA    
  • 42. Vielen Dank für Ihre Aufmerksamkeit! Fragen? Roman Roelofsen     r.roelofsen@prosyst.com
  • 43.