SlideShare ist ein Scribd-Unternehmen logo
1 von 19
JBoss AS7 OSGi




          Thomas Diesler
            thomas.diesler@jboss.com




                                  1
Agenda
• OSGi Core
• Enterprise OSGi
• OSGi in AS7
OSGi Core: Modularity
• OSGi modules are called 'Bundles'
• Computed classloader delegation graph
• Bundles can be added,
  removed & updated dynamically JRE         JRE

• Side-by-side versioning
• Private truly private      Lib A
                             Lib A         Lib B
                                           Lib B          Lib A'
                                                          Lib A'

• No more Jar Hell
• OSGi Bundle can be a            Module A       Module B
                                  Module A       Module B
  plain Jar at the same time
OSGi Core: Services
• “SOA inside the JVM”
• Services looked up by type and/or custom
  filter
  – “I want a service that implements
    org.acme.Payment where location=US”
  – One or many
• Dynamic! Services can be updated without
  taking down the consumers
  – OSGi Service Consumers react to dynamism
The Dawning of Life

                              Attention on Modules




                           Appreciation of module
                               independence


                               Concern about module
                             life-cycle and governance




                                …but the problem
                                 already existed!




5                     © 2011 IBM Corporation
Cost vs Complexity
Cost
                               Big ball of mud


            Traditional

                                                 Many small &
                                                 focused modules
                          Modular




                                                   Complexity

       Modularity highly improves
                            *
            maintainability
OSGi Bundles vs. JBoss Modules

• OSGi is a standard             • Modules not portable
• Uses a complex resolver        • Uses explicit wiring
• Wiring based on rich           • Wiring based on module
  metadata. Package version        name. Multiple “slots” are
  just one criteria                supported
• Many compendium                • Exist in the context of AS7
  specifications and other 3rd   • Very fast resolution
  party bundles
• Attachable Fragments
• Sensitive to execution env
OSGi Service vs. MSC Services

• Keyed by Interface they       • Keyed by unique service
  implement                       name
• LDAP filter supported         • No filtering, name only
• Lifecycle tied to owner       • Lifecycle tied to owner
  bundle or explicit API          owner or explicit API
• Service dependency and        • Service dependency and
  injection via DS, Blueprint     injection by MSC API
• ServiceListener supported     • ServiceListener supported
• ServiceFactory supported      • Instance per service name
• ConfigurationAdmin            • ConfigAdmin in AS7
R5 Enterprise OSGi
• Mapping of a number of EE specs
     – Webapp               – JPA
     – JTA                  – JNDI
     – JDBC         – JMX
• Remote Services
• Resolver
• Repository
• Subsystems
• Blueprint
Enterprise OSGi - Future
•   RFC 146 JCA
•   RFP 133 Cloud Computing
•   RFP 146 - CDI Integration
•   RFP 152 - EJB Integration
OSGi Core in AS7
• AS7 is a fully compliant OSGi 4.2 Core
  Framework
  – TCK tests pass 100%
• Just deploy your OSGi Bundles
  – Through the standard AS7 deployment
    channels
OSGi Core Implementation
• Implemented from scratch on top of jboss-
  modules and jboss-msc
• For the OSGi resolver we use the one from
  Apache Felix
  – Resolver computes the bundle classloader
    wirings
  – Based on OSGi Metadata
     • e.g. Import-Package / Export-Package
AS7 OSGi Integration

• Use OSGi services in EE components
• Use EE components in OSGi services
• JBoss modules/msc as integration layer
• Every bundle is a module. Not every module
  is bundle
• Support for WebApp, EJB, CDI, JAX-RS,
  JAX-WS, JPA as OSGi deployments
• Support for Bundles in EAR files
Enterprise OSGi in AS7
• AS7 out of the Box:
  – OSGi Core, Compendium APIs
  – Enterprise OSGi JMX, JNDI, JTA, WebApp,
    Blueprint
  – OSGi ConfigAdmin, EventAdmin, HttpServer
  – Management through WebConsole
OSGi in AS7 – Next Steps
• OSGi R5 specification
• OSGi Enterprise Applications
• Provisioning service
Demo
• Show how an EJB3 can access an OSGi
  payment service
• Show how a Servlet can access an OSGi
  payment service
Q&A
Links

• AS7 home page
  http://www.jboss.org/jbossas
• AS7 OSGi home page
  http://www.jboss.org/jbossas/osgi
• OSGi Specifications
  http://www.osgi.org/Download/Release4V42
• JBoss OSGi Diary
  http://jbossosgi.blogspot.com
Acknowledgements
• Cost vs Complexity, Hal Hildebrand
  http://bit.ly/i42uBo
• Dawning of Life, Graham Charters, IBM

Weitere ähnliche Inhalte

Was ist angesagt?

Implementing advanced integration patterns with WSO2 ESB
Implementing advanced integration patterns with WSO2 ESBImplementing advanced integration patterns with WSO2 ESB
Implementing advanced integration patterns with WSO2 ESBWSO2
 
WSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise IntegrationWSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise IntegrationKasun Indrasiri
 
Introduction to WSO2 ESB
Introduction to WSO2 ESB Introduction to WSO2 ESB
Introduction to WSO2 ESB WSO2
 
Eclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewEclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewDev_Events
 
Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)Florent Guillaume
 
Academy PRO: Entity Framework Сore
Academy PRO: Entity Framework СoreAcademy PRO: Entity Framework Сore
Academy PRO: Entity Framework СoreBinary Studio
 
Deploying Web Applications with WildFly 8
Deploying Web Applications with WildFly 8Deploying Web Applications with WildFly 8
Deploying Web Applications with WildFly 8Arun Gupta
 
Webbinar slides
Webbinar slidesWebbinar slides
Webbinar slidesWSO2
 

Was ist angesagt? (9)

Implementing advanced integration patterns with WSO2 ESB
Implementing advanced integration patterns with WSO2 ESBImplementing advanced integration patterns with WSO2 ESB
Implementing advanced integration patterns with WSO2 ESB
 
WSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise IntegrationWSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise Integration
 
Introduction to WSO2 ESB
Introduction to WSO2 ESB Introduction to WSO2 ESB
Introduction to WSO2 ESB
 
Eclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewEclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s View
 
Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)
 
Weblogic server short
Weblogic server shortWeblogic server short
Weblogic server short
 
Academy PRO: Entity Framework Сore
Academy PRO: Entity Framework СoreAcademy PRO: Entity Framework Сore
Academy PRO: Entity Framework Сore
 
Deploying Web Applications with WildFly 8
Deploying Web Applications with WildFly 8Deploying Web Applications with WildFly 8
Deploying Web Applications with WildFly 8
 
Webbinar slides
Webbinar slidesWebbinar slides
Webbinar slides
 

Andere mochten auch

Decentralized Workflow Execution using a Chemical Metaphor
Decentralized Workflow Execution using a Chemical MetaphorDecentralized Workflow Execution using a Chemical Metaphor
Decentralized Workflow Execution using a Chemical MetaphorHéctor Fernández
 
Eclipse Membership 3-13-12
Eclipse Membership 3-13-12Eclipse Membership 3-13-12
Eclipse Membership 3-13-12Jeff Ginsburg
 
Albertrough draft
Albertrough draftAlbertrough draft
Albertrough draftaarussll87
 
Eastman house membership 031312
Eastman house membership 031312Eastman house membership 031312
Eastman house membership 031312Jeff Ginsburg
 
Produse noi MEFIN
Produse noi MEFINProduse noi MEFIN
Produse noi MEFINEGAGENEL
 
5753-18832-1-PB(Yahya A. Tayeb)
5753-18832-1-PB(Yahya A. Tayeb)5753-18832-1-PB(Yahya A. Tayeb)
5753-18832-1-PB(Yahya A. Tayeb)yahya2012
 

Andere mochten auch (9)

Decentralized Workflow Execution using a Chemical Metaphor
Decentralized Workflow Execution using a Chemical MetaphorDecentralized Workflow Execution using a Chemical Metaphor
Decentralized Workflow Execution using a Chemical Metaphor
 
Eclipse Membership 3-13-12
Eclipse Membership 3-13-12Eclipse Membership 3-13-12
Eclipse Membership 3-13-12
 
List of publications
List of publicationsList of publications
List of publications
 
Albertrough draft
Albertrough draftAlbertrough draft
Albertrough draft
 
Abdullah Al-Muyeed CV
Abdullah Al-Muyeed CVAbdullah Al-Muyeed CV
Abdullah Al-Muyeed CV
 
Portfolio_Muyeed
Portfolio_MuyeedPortfolio_Muyeed
Portfolio_Muyeed
 
Eastman house membership 031312
Eastman house membership 031312Eastman house membership 031312
Eastman house membership 031312
 
Produse noi MEFIN
Produse noi MEFINProduse noi MEFIN
Produse noi MEFIN
 
5753-18832-1-PB(Yahya A. Tayeb)
5753-18832-1-PB(Yahya A. Tayeb)5753-18832-1-PB(Yahya A. Tayeb)
5753-18832-1-PB(Yahya A. Tayeb)
 

Ähnlich wie AS7/OSGi One Day Talk 2012

OSGi In Anger - Tara Simpson
OSGi In Anger - Tara SimpsonOSGi In Anger - Tara Simpson
OSGi In Anger - Tara Simpsonmfrancis
 
OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2pjhInovex
 
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentOSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentSanjeeb Sahoo
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaArun Gupta
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJAX London
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011njbartlett
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC MetropjhInovex
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1pjhInovex
 
Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os giDileepa Jayakody
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OpenBlend society
 
OSGi and Private Clouds
OSGi and Private CloudsOSGi and Private Clouds
OSGi and Private Cloudsmfrancis
 
OSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon KaegiOSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon Kaegimfrancis
 
Introducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management PlatformIntroducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management PlatformNuxeo
 
Eclipse Apricot
Eclipse ApricotEclipse Apricot
Eclipse ApricotNuxeo
 

Ähnlich wie AS7/OSGi One Day Talk 2012 (20)

OSGi In Anger - Tara Simpson
OSGi In Anger - Tara SimpsonOSGi In Anger - Tara Simpson
OSGi In Anger - Tara Simpson
 
OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2
 
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentOSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 India
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
OSGi introduction
OSGi introductionOSGi introduction
OSGi introduction
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC Metro
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1
 
OSGi
OSGiOSGi
OSGi
 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
 
Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os gi
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
 
OSGi and Private Clouds
OSGi and Private CloudsOSGi and Private Clouds
OSGi and Private Clouds
 
OSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon KaegiOSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon Kaegi
 
Introducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management PlatformIntroducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management Platform
 
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
 
Eclipse Apricot
Eclipse ApricotEclipse Apricot
Eclipse Apricot
 

AS7/OSGi One Day Talk 2012

  • 1. JBoss AS7 OSGi Thomas Diesler thomas.diesler@jboss.com 1
  • 2. Agenda • OSGi Core • Enterprise OSGi • OSGi in AS7
  • 3. OSGi Core: Modularity • OSGi modules are called 'Bundles' • Computed classloader delegation graph • Bundles can be added, removed & updated dynamically JRE JRE • Side-by-side versioning • Private truly private Lib A Lib A Lib B Lib B Lib A' Lib A' • No more Jar Hell • OSGi Bundle can be a Module A Module B Module A Module B plain Jar at the same time
  • 4. OSGi Core: Services • “SOA inside the JVM” • Services looked up by type and/or custom filter – “I want a service that implements org.acme.Payment where location=US” – One or many • Dynamic! Services can be updated without taking down the consumers – OSGi Service Consumers react to dynamism
  • 5. The Dawning of Life Attention on Modules Appreciation of module independence Concern about module life-cycle and governance …but the problem already existed! 5 © 2011 IBM Corporation
  • 6. Cost vs Complexity Cost Big ball of mud Traditional Many small & focused modules Modular Complexity Modularity highly improves * maintainability
  • 7. OSGi Bundles vs. JBoss Modules • OSGi is a standard • Modules not portable • Uses a complex resolver • Uses explicit wiring • Wiring based on rich • Wiring based on module metadata. Package version name. Multiple “slots” are just one criteria supported • Many compendium • Exist in the context of AS7 specifications and other 3rd • Very fast resolution party bundles • Attachable Fragments • Sensitive to execution env
  • 8. OSGi Service vs. MSC Services • Keyed by Interface they • Keyed by unique service implement name • LDAP filter supported • No filtering, name only • Lifecycle tied to owner • Lifecycle tied to owner bundle or explicit API owner or explicit API • Service dependency and • Service dependency and injection via DS, Blueprint injection by MSC API • ServiceListener supported • ServiceListener supported • ServiceFactory supported • Instance per service name • ConfigurationAdmin • ConfigAdmin in AS7
  • 9. R5 Enterprise OSGi • Mapping of a number of EE specs – Webapp – JPA – JTA – JNDI – JDBC – JMX • Remote Services • Resolver • Repository • Subsystems • Blueprint
  • 10. Enterprise OSGi - Future • RFC 146 JCA • RFP 133 Cloud Computing • RFP 146 - CDI Integration • RFP 152 - EJB Integration
  • 11. OSGi Core in AS7 • AS7 is a fully compliant OSGi 4.2 Core Framework – TCK tests pass 100% • Just deploy your OSGi Bundles – Through the standard AS7 deployment channels
  • 12. OSGi Core Implementation • Implemented from scratch on top of jboss- modules and jboss-msc • For the OSGi resolver we use the one from Apache Felix – Resolver computes the bundle classloader wirings – Based on OSGi Metadata • e.g. Import-Package / Export-Package
  • 13. AS7 OSGi Integration • Use OSGi services in EE components • Use EE components in OSGi services • JBoss modules/msc as integration layer • Every bundle is a module. Not every module is bundle • Support for WebApp, EJB, CDI, JAX-RS, JAX-WS, JPA as OSGi deployments • Support for Bundles in EAR files
  • 14. Enterprise OSGi in AS7 • AS7 out of the Box: – OSGi Core, Compendium APIs – Enterprise OSGi JMX, JNDI, JTA, WebApp, Blueprint – OSGi ConfigAdmin, EventAdmin, HttpServer – Management through WebConsole
  • 15. OSGi in AS7 – Next Steps • OSGi R5 specification • OSGi Enterprise Applications • Provisioning service
  • 16. Demo • Show how an EJB3 can access an OSGi payment service • Show how a Servlet can access an OSGi payment service
  • 17. Q&A
  • 18. Links • AS7 home page http://www.jboss.org/jbossas • AS7 OSGi home page http://www.jboss.org/jbossas/osgi • OSGi Specifications http://www.osgi.org/Download/Release4V42 • JBoss OSGi Diary http://jbossosgi.blogspot.com
  • 19. Acknowledgements • Cost vs Complexity, Hal Hildebrand http://bit.ly/i42uBo • Dawning of Life, Graham Charters, IBM

Hinweis der Redaktion

  1. Welcome to the wonderful world of OSGi!