SlideShare a Scribd company logo
1 of 37
Download to read offline
Modular EJBs in OSGi

Tim Ward

IBM

21 Sep 2011




                                                                             OSGi Alliance Marketing © 2008-2010 . 1
                                                                                                            Page
COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved, © IBM Corp. 2011
                                                                             All Rights Reserved
Legal

  • Java and all Java-based trademarks and logos are trademarks
    or registered trademarks of Oracle and/or its affiliates.

  • OSGi and the OSGi logo are trademarks or registered
    trademarks of the OSGi Alliance

  • Other product and service names might be trademarks of IBM
    or other companies. A current list of IBM trademarks is
    available on the Web at “Copyright and trademark information”
    at www.ibm.com/legal/copytrade.shtml



  Page 2   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
           © IBM Corp. 2011
Agenda

• A Quick EJB refresher

• How EJBs might fit into OSGi

• A case study in implementing Modular EJB

• Proof that it really works



   Page 3   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
            © IBM Corp. 2011
Terminology

• EJB                                        – Enterprise Java Bean

• EJB JAR                                    – A JAR packaging EJBs

• Modular EJB                                – An EJB running in OSGi

• EJB Bundle                                 – An OSGi bundle packaging Modular
                                               EJBs


  Page 4   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
           © IBM Corp. 2011
EJBs – the basics

• EJBs are managed objects, the container injects their
  dependencies

• Session EJBs define one or more business “views”
   • These proxy the real EJB object(s)
   • The same view object may delegate to the same, or
     a different, EJB for successive calls
   • Different EJB types have different delegation styles

• The EJB runtime adds declarative transactions, security
  and other services when a business method is called
   Page 5   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
            © IBM Corp. 2011
EJB Views and OSGi services
An EJB view shares a number of concepts with an OSGi
service.

                            EJB View                                      OSGi Service
 Cardinality                May proxy one or many                         One per registration or one
                            EJB objects                                   per client bundle
 Location                   Stored in JNDI                                Stored in the OSGi service
                                                                          registry
 Interface                  One business interface per One service may expose
                            EJB view                   many interfaces
 Lifecycle                  Relatively static once                        Dynamic, may be removed
                            created, no reinjection, no                   or modified and underlying
                            notifications from JNDI                       dependencies may change

   Page 6    OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Integrating EJBs with OSGi
• The service registry is the integration point in OSGi
   • Expose modular EJBs as OSGi services

• Register one service per EJB view
   • Remote EJB views should be Remoteable Services
      • service.exported.interfaces = *

• EJB services only work with the right lookup lifecycle
   • Stateless are an interchangable pool
   • Singleton is like a normal service
   • Stateful EJBs are “one per lookup”

   Page 7   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
            © IBM Corp. 2011
Identifying EJB Bundles in OSGi
   Requirement
1) EJB Bundles should be able to be EJB JARs as well
2) Fit with existing OSGi module definitions (e.g. WABs)

  Proposal
• Add a new header “Export-EJB:”
   • Identifies a bundle as an EJB-Bundle
   • Defines which EJBs are exposed as OSGi services
   • Pioneered by Glassfish Application Server
       • Known to work – good basis for a standard?

   Page 8   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
            © IBM Corp. 2011
Running Modular EJBs in Aries
• Apache Aries provides pieces of an OSGi container
   • Integrate with existing projects where possible

• OpenEJB has been packaged as an OSGi bundle for a
  couple of releases
   • Some tentative OSGi support, little true integration

Mission Statement
Integrate OpenEJB with existing OSGi standards/Aries
features to provide full support for Modular EJBs


   Page 9   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
            © IBM Corp. 2011
Issues Running EJBs in OSGi
• Locating EJBs in OSGi bundles

• OSGi class loading semantics

• Building EJB proxy stubs

• Transaction Manager integration

• JPA integration

• Security integration

• Miscellaneous
   Page 10   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Working with EJB Bundles
– Finding the EJBs
• EJBs are defined in one of two ways
   • via annotations
   • via XML in the EJB deployment descriptor

• In Java EE the XML deployment descriptor is called
  META-INF/ejb-jar.xml
   • Requirement 1 says that EJB Bundles do the same

• Locating the XML descriptor is non-trivial for OpenEJB
   • Candidate bundles specify Export-EJB header
   Page 11   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Working with EJB Bundles
– Finding the EJBs (2)
• Finding Annotated EJBs much harder than XML
   • Typically a container “scans” the classpath by listing
     files on the file system (using file: or jar: URLs)

• In OSGi there is no guarantee of the bundle being on
  the filesystem (or in its original layout)
   • Typical scanning breaks at this point, so either:
       • Scan the raw bundle bytes, JAR format, but miss
         fragments, imports and the bundle classpath
       • Implement an OSGi aware scanner
   Page 12   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Apache Aries –
Locating META-INF/ejb-jar.xml
• OpenEJB allows us to build our own EJBModule
  representing the EJB Bundle

• An OpenEJB EJBModule allows us to supply a URL to
  the EJB deployment descriptor
   • This is parsed and processed by OpenEJB

• Aries makes all .xml files in META-INF available
   • Covers other Java EE specs
   • Covers OpenEJB config files

   Page 13   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Apache Aries –
Implementing an OSGi aware scanner
• In OSGi 4.3 a new core API method was added
   • BundleWiring.listResources(String, String, int)

• We can plug an OSGi specific Xbean scanner into our
  EJBModule

for(String resource : bundle.adapt(BundleWiring.class).
    listResources("/", "*.class", LISTRESOURCES_RECURSE)) {
      URL u = bundle.getResource(resource)
      readClassDef(u.openStream());
}
     Page 14   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
               © IBM Corp. 2011
Issues Running EJBs in OSGi
• Locating EJBs in OSGi bundles

• OSGi class loading semantics

• Building EJB proxy stubs

• Transaction Manager integration

• JPA integration

• Security integration

• Miscellaneous
   Page 15   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Java EE vs OSGi class loading
• One of the key differences between OSGi and Java EE
  is how they load classes

• Java EE has a hierarchy of ClassLoader instances
   • EJB JAR → Application → EJB Container → Java

• OSGi has a ClassLoader network...
                                                                             EJB API
       Business
       API
                                                      EJB Bundle

             ?                                                               Logger
                                      ?                           ?      ?
  Page 16   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
            © IBM Corp. 2011
Apache Aries –
EJB Classloading for EJB Bundles
• Clearly the OpenEJB EJBModule ClassLoader should
  be the EJB Bundle ClassLoader

• OpenEJB relies on the fact that it is visible from the EJB
  JAR and Application ClassLoaders
   • No requirement for EJB Bundles to import OpenEJB
   • Make OpenEJB visible from Application ClassLoader
  Business
  API
  EJB JAR ClassLoader
             EJB Bundle                                                   Application ClassLoader
                                                                               Open EJB
  EJB API
   Page 17   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Issues Running EJBs in OSGi
• Locating EJBs in OSGi bundles

• OSGi class loading semantics

• Building EJB proxy stubs

• Transaction Manager integration

• JPA integration

• Security integration

• Miscellaneous
   Page 18   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Implementing EJBs in OSGi
• In general EJB views are implemented as proxy “stubs”
   • Implement a single business interface
   • May implement other container specific interfaces
   • Often implement javax.naming.Referencable

• Stubs may be dynamic proxys or generated classes
   • In either case they must be loaded as classes

• In OSGi each bundle has a different ClassLoader
   • There may not be any one bundle that can see all
     the interfaces on the proxy!

   Page 19   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Apache Aries –
OSGi safe proxy classes
• Aries contains an OSGi aware proxy implementation
   • Supports dynamic interface implementation
     generation for one to N interfaces

• The proxy allows a parent bundle to be specified
   • The proxy understands that not all interfaces may be
     visible to the bundle!

•   Aries replaces the default OpenEJB JDK Proxy factory
    • EJB stubs can use any mixture of interfaces

    Page 20   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
              © IBM Corp. 2011
Issues Running EJBs in OSGi
• Locating EJBs in OSGi bundles

• OSGi class loading semantics

• Building EJB proxy stubs

• Transaction Manager integration

• JPA integration

• Security integration

• Miscellaneous
   Page 21   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
EJBs and Transactions
• EJBs have an extremely strong link with transactions
   • All invocations use a global transaction by default

• More complex interactions can be configured
  • EJBs can control their own transactions too

• In OSGi we use the JTA Service to get hold of a
  TransactionManager
   • OpenEJB knows nothing about this...




   Page 22   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Apache Aries –
JTA integration
• Aries contains a JTA Service implementation that uses
  Geronimo's transaction manager
   • Also provides a TransactionSynchronizationRegistry

• Aries overrides the OpenEJB transaction manager
   • Use the JTA Service
   • Provide the Tx Manager and Tx Registry

•   This is a clean and well used plug point


    Page 23   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
              © IBM Corp. 2011
Issues Running EJBs in OSGi
• Locating EJBs in OSGi bundles

• OSGi class loading semantics

• Building EJB proxy stubs

• Transaction Manager integration

• JPA integration

• Security integration

• Miscellaneous
   Page 24   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
EJBs and JPA
• JPA replaced Entity Beans as the persistence strategy
  for Java EE

• EJBs have tight integration with JPA
   • Injection via Annotations
   • Injection via XML
   • JNDI lookup in java:comp/env

• EJBs may use JPA in two ways
   • Application Managed
   • Container Managed

   Page 25   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
EJBs and JPA – Application Managed
• In Application managed JPA the EJB manages lifecycle
   • Responsible for creating and closing EntityManagers
   • Responsible for joining any active transactions

• Adds a dependency on a named persistence unit
   • Injects or looks up an EntityManagerFactory

• OpenEJB expects to find, create, and manage any
  persistence units in persistence.xml
   • ClassLoader problems make this impossible in OSGi


   Page 26   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Apache Aries –
Updates to Aries JPA container
• Aries JPA normally uses the Meta-Persistence header
  to locate persistence bundles in the framework

• Java EE also defines rules for finding persistence units
   • WARs in WEB-INF/classes, or in WEB-INF/lib
   • EJB JARs in META-INF

• Aries JPA already checks for Web-ContextPath
   • Add support for the Export-EJB header too


   Page 27   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Apache Aries –
JPA integration (Application Managed)
• Hide META-INF/persistence.xml from OpenEJB
   • Don't put the URL in the EJBModule

• OpenEJB validates all EJBs to make sure that any
  persistence unit they use is available in the Application
   • Override this validation failure, Aries JPA will build it!

• Listen for the registration of OSGi persistence units
   • If the unit is used by an EJB then bind it into the right
     place in java:comp/env

   Page 28   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
EJBs and JPA – Container Managed
• In Container managed JPA the container manages
  everything!
   • Tx integration
   • Creating and closing EntityManagers

• More importantly, the container propagates context
  • Different EJBs that use the same persistence unit in
    a transaction will get the same EntityManager

• Aries JPA already supports this mode of operation for
  blueprint beans and OSGi service lookups
   • It does not support Extended Contexts!
   Page 29   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
EJBs and JPA – Container Managed
(Extended Persistence Contexts)
• Extended persistence contexts apply to Stateful
  Session beans (hence Aries JPA hasn't got them!)

• An Extended Persistence context may start before, and
  lives beyond the end of a transaction
    • It joins any active transaction when used
        • It cannot replace an existing managed context
        • It can become the managed context for a given tx

• OpenEJB is required to support this mode of operation

   Page 30   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Apache Aries –
JPA integration (Container Managed)
• Replace the existing OpenEJB JPA context registry
   • Check for Aries JPA contexts and OpenEJB contexts
   • Cross register any created contexts so both agree!

• Listen for the registration of OSGi persistence units
   • If the unit is used as a managed context in an EJB
     then create an OpenEJB managed EntityManager
       • Register this EntityManager in the relevant part of
         java:comp/env


   Page 31   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Issues Running EJBs in OSGi
• Locating EJBs in OSGi bundles

• OSGi class loading semantics

• Building EJB proxy stubs

• Transaction Manager integration

• JPA integration

• Security integration

• Miscellaneous
   Page 32   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Java EE Security
• Java EE supports fine-grained, role-based authorization
   • On Servlet methods
   • On EJB method calls

• OpenEJB provides a Security Service plugpoint
  • Allows third party authentication/authorization
    engines to be used

• Aries has no security component - any volunteers?
   • OpenEJB can cope without a Security Service
   • No integration at this time

   Page 33   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Issues Running EJBs in OSGi
• Locating EJBs in OSGi bundles

• OSGi class loading semantics

• Building EJB proxy stubs

• Transaction Manager integration

• JPA integration

• Security integration

• Miscellaneous
   Page 34   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Issues with using OpenEJB in OSGi
• OpenEJB makes extensive use of XBean internally to
  build things
   • This has the option of providing a ClassLoader
       • OpenEJB typically provides none

• OpenEjbVersion throws an ExceptionInInitializerError
  • Attempts to classpath scan for properties

• To work around these Aries has to extensively set the
  Thread Context ClassLoader when initializing OpenEJB
   • New JAXB code in OpenEJB needs delegating to a
     2.1 JAXB implementation every time we build an app
   Page 35   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
Summary
• There are a few rough edges
   • Some can easily be remedied in OpenEJB internals

• Some support is clearly missing, but could be added
   • Security, Messaging, EJB lite

• Broadly speaking, it works
   • And I can prove it!
      • Apache Aries Blog sample with an EJB
        implemented comment service!


   Page 36   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
             © IBM Corp. 2011
References
                  Apache Aries: http://aries.apache.org/

 Tim Ward: @TimothyWard timothyjward@apache.org

                     OSGi and JPA on YouTube:
            http://www.youtube.com/user/EnterpriseOSGi

 For more information on Enterprise OSGi take a look at
               Enterprise OSGi in Action :
           http://www.manning.com/cummins

  Page 37     OSGi Alliance Marketing © 2008-2011 . All Rights Reserved,
              © IBM Corp. 2011

More Related Content

What's hot

Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph! ...
Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph!  ...Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph!  ...
Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph! ...mfrancis
 
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
 
OSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishOSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishArun Gupta
 
CDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily JiangCDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily Jiangmfrancis
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration BackendArun Gupta
 
Keynote: OSGi Past, Present and Future - Alex Blewitt
Keynote: OSGi Past, Present and Future - Alex BlewittKeynote: OSGi Past, Present and Future - Alex Blewitt
Keynote: OSGi Past, Present and Future - Alex Blewittmfrancis
 
Embrace Change - Embrace OSGi
Embrace Change - Embrace OSGiEmbrace Change - Embrace OSGi
Embrace Change - Embrace OSGiCarsten Ziegeler
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overviewsbobde
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityGraham Charters
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-finalRohit Kelapure
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Shreedhar Ganapathy
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structureodedns
 
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologyThe Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologySimon Ritter
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Peter R. Egli
 
If You Know JSF, You Know Portals and Portlets
If You Know JSF, You Know Portals and PortletsIf You Know JSF, You Know Portals and Portlets
If You Know JSF, You Know Portals and PortletsWesley Hales
 

What's hot (20)

Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph! ...
Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph!  ...Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph!  ...
Bytecode Weaving in OSGi – Enhance Your Classes, Not Your Dependency graph! ...
 
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
 
Osgi platform
Osgi platformOsgi platform
Osgi platform
 
OSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFishOSGi-enabled Java EE applications in GlassFish
OSGi-enabled Java EE applications in GlassFish
 
CDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily JiangCDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily Jiang
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
Keynote: OSGi Past, Present and Future - Alex Blewitt
Keynote: OSGi Past, Present and Future - Alex BlewittKeynote: OSGi Past, Present and Future - Alex Blewitt
Keynote: OSGi Past, Present and Future - Alex Blewitt
 
Embrace Change - Embrace OSGi
Embrace Change - Embrace OSGiEmbrace Change - Embrace OSGi
Embrace Change - Embrace OSGi
 
Java modularization
Java modularizationJava modularization
Java modularization
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
OSGI in Java EE servers:Sneak peak
OSGI in Java EE servers:Sneak peakOSGI in Java EE servers:Sneak peak
OSGI in Java EE servers:Sneak peak
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is Modularity
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
 
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologyThe Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans Technology
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)
 
If You Know JSF, You Know Portals and Portlets
If You Know JSF, You Know Portals and PortletsIf You Know JSF, You Know Portals and Portlets
If You Know JSF, You Know Portals and Portlets
 

Similar to Modular EJBs in OSGi - Tim Ward

Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJAX London
 
modular-ejbs-for-enterprise-osgi developers
modular-ejbs-for-enterprise-osgi developersmodular-ejbs-for-enterprise-osgi developers
modular-ejbs-for-enterprise-osgi developersGabrielBran5
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionKelum Senanayake
 
Subsystems: For those occasions where bundles are just too small... - Graham ...
Subsystems: For those occasions where bundles are just too small... - Graham ...Subsystems: For those occasions where bundles are just too small... - Graham ...
Subsystems: For those occasions where bundles are just too small... - Graham ...mfrancis
 
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
 
AS7/OSGi One Day Talk 2012
AS7/OSGi One Day Talk 2012AS7/OSGi One Day Talk 2012
AS7/OSGi One Day Talk 2012tdiesler
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the CloudBert Ertman
 
The Complete Spring Tutorial
The Complete Spring TutorialThe Complete Spring Tutorial
The Complete Spring Tutorialcribes
 
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 enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P KriensOSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriensmfrancis
 
OSGi Community Event 2010 - A Crash Course in OSGi Application Development
OSGi Community Event 2010 - A Crash Course in OSGi Application DevelopmentOSGi Community Event 2010 - A Crash Course in OSGi Application Development
OSGi Community Event 2010 - A Crash Course in OSGi Application Developmentmfrancis
 
OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009Toralf Richter
 
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012Jagadish Prasath
 
OSGi Best Practices - Tim Ward
OSGi Best Practices - Tim WardOSGi Best Practices - Tim Ward
OSGi Best Practices - Tim Wardmfrancis
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Wardmfrancis
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Arun Gupta
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi DevelopmentPaul Fiore
 

Similar to Modular EJBs in OSGi - Tim Ward (20)

Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
 
modular-ejbs-for-enterprise-osgi developers
modular-ejbs-for-enterprise-osgi developersmodular-ejbs-for-enterprise-osgi developers
modular-ejbs-for-enterprise-osgi developers
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
 
Subsystems: For those occasions where bundles are just too small... - Graham ...
Subsystems: For those occasions where bundles are just too small... - Graham ...Subsystems: For those occasions where bundles are just too small... - Graham ...
Subsystems: For those occasions where bundles are just too small... - Graham ...
 
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
 
AS7/OSGi One Day Talk 2012
AS7/OSGi One Day Talk 2012AS7/OSGi One Day Talk 2012
AS7/OSGi One Day Talk 2012
 
Modular Java EE in the Cloud
Modular Java EE in the CloudModular Java EE in the Cloud
Modular Java EE in the Cloud
 
The Complete Spring Tutorial
The Complete Spring TutorialThe Complete Spring Tutorial
The Complete Spring Tutorial
 
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 enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P KriensOSGi enRoute Unveiled - P Kriens
OSGi enRoute Unveiled - P Kriens
 
Hybrid Applications
Hybrid ApplicationsHybrid Applications
Hybrid Applications
 
OSGi Community Event 2010 - A Crash Course in OSGi Application Development
OSGi Community Event 2010 - A Crash Course in OSGi Application DevelopmentOSGi Community Event 2010 - A Crash Course in OSGi Application Development
OSGi Community Event 2010 - A Crash Course in OSGi Application Development
 
OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009OSGi Overview TomTom DevDay May 2009
OSGi Overview TomTom DevDay May 2009
 
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
 
OSGi Best Practices - Tim Ward
OSGi Best Practices - Tim WardOSGi Best Practices - Tim Ward
OSGi Best Practices - Tim Ward
 
Unite5-EJB-2019.ppt
Unite5-EJB-2019.pptUnite5-EJB-2019.ppt
Unite5-EJB-2019.ppt
 
GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Ward
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
 

More from mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Modular EJBs in OSGi - Tim Ward

  • 1. Modular EJBs in OSGi Tim Ward IBM 21 Sep 2011 OSGi Alliance Marketing © 2008-2010 . 1 Page COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved, © IBM Corp. 2011 All Rights Reserved
  • 2. Legal • Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. • OSGi and the OSGi logo are trademarks or registered trademarks of the OSGi Alliance • Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml Page 2 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 3. Agenda • A Quick EJB refresher • How EJBs might fit into OSGi • A case study in implementing Modular EJB • Proof that it really works Page 3 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 4. Terminology • EJB – Enterprise Java Bean • EJB JAR – A JAR packaging EJBs • Modular EJB – An EJB running in OSGi • EJB Bundle – An OSGi bundle packaging Modular EJBs Page 4 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 5. EJBs – the basics • EJBs are managed objects, the container injects their dependencies • Session EJBs define one or more business “views” • These proxy the real EJB object(s) • The same view object may delegate to the same, or a different, EJB for successive calls • Different EJB types have different delegation styles • The EJB runtime adds declarative transactions, security and other services when a business method is called Page 5 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 6. EJB Views and OSGi services An EJB view shares a number of concepts with an OSGi service. EJB View OSGi Service Cardinality May proxy one or many One per registration or one EJB objects per client bundle Location Stored in JNDI Stored in the OSGi service registry Interface One business interface per One service may expose EJB view many interfaces Lifecycle Relatively static once Dynamic, may be removed created, no reinjection, no or modified and underlying notifications from JNDI dependencies may change Page 6 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 7. Integrating EJBs with OSGi • The service registry is the integration point in OSGi • Expose modular EJBs as OSGi services • Register one service per EJB view • Remote EJB views should be Remoteable Services • service.exported.interfaces = * • EJB services only work with the right lookup lifecycle • Stateless are an interchangable pool • Singleton is like a normal service • Stateful EJBs are “one per lookup” Page 7 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 8. Identifying EJB Bundles in OSGi Requirement 1) EJB Bundles should be able to be EJB JARs as well 2) Fit with existing OSGi module definitions (e.g. WABs) Proposal • Add a new header “Export-EJB:” • Identifies a bundle as an EJB-Bundle • Defines which EJBs are exposed as OSGi services • Pioneered by Glassfish Application Server • Known to work – good basis for a standard? Page 8 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 9. Running Modular EJBs in Aries • Apache Aries provides pieces of an OSGi container • Integrate with existing projects where possible • OpenEJB has been packaged as an OSGi bundle for a couple of releases • Some tentative OSGi support, little true integration Mission Statement Integrate OpenEJB with existing OSGi standards/Aries features to provide full support for Modular EJBs Page 9 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 10. Issues Running EJBs in OSGi • Locating EJBs in OSGi bundles • OSGi class loading semantics • Building EJB proxy stubs • Transaction Manager integration • JPA integration • Security integration • Miscellaneous Page 10 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 11. Working with EJB Bundles – Finding the EJBs • EJBs are defined in one of two ways • via annotations • via XML in the EJB deployment descriptor • In Java EE the XML deployment descriptor is called META-INF/ejb-jar.xml • Requirement 1 says that EJB Bundles do the same • Locating the XML descriptor is non-trivial for OpenEJB • Candidate bundles specify Export-EJB header Page 11 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 12. Working with EJB Bundles – Finding the EJBs (2) • Finding Annotated EJBs much harder than XML • Typically a container “scans” the classpath by listing files on the file system (using file: or jar: URLs) • In OSGi there is no guarantee of the bundle being on the filesystem (or in its original layout) • Typical scanning breaks at this point, so either: • Scan the raw bundle bytes, JAR format, but miss fragments, imports and the bundle classpath • Implement an OSGi aware scanner Page 12 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 13. Apache Aries – Locating META-INF/ejb-jar.xml • OpenEJB allows us to build our own EJBModule representing the EJB Bundle • An OpenEJB EJBModule allows us to supply a URL to the EJB deployment descriptor • This is parsed and processed by OpenEJB • Aries makes all .xml files in META-INF available • Covers other Java EE specs • Covers OpenEJB config files Page 13 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 14. Apache Aries – Implementing an OSGi aware scanner • In OSGi 4.3 a new core API method was added • BundleWiring.listResources(String, String, int) • We can plug an OSGi specific Xbean scanner into our EJBModule for(String resource : bundle.adapt(BundleWiring.class). listResources("/", "*.class", LISTRESOURCES_RECURSE)) { URL u = bundle.getResource(resource) readClassDef(u.openStream()); } Page 14 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 15. Issues Running EJBs in OSGi • Locating EJBs in OSGi bundles • OSGi class loading semantics • Building EJB proxy stubs • Transaction Manager integration • JPA integration • Security integration • Miscellaneous Page 15 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 16. Java EE vs OSGi class loading • One of the key differences between OSGi and Java EE is how they load classes • Java EE has a hierarchy of ClassLoader instances • EJB JAR → Application → EJB Container → Java • OSGi has a ClassLoader network... EJB API Business API EJB Bundle ? Logger ? ? ? Page 16 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 17. Apache Aries – EJB Classloading for EJB Bundles • Clearly the OpenEJB EJBModule ClassLoader should be the EJB Bundle ClassLoader • OpenEJB relies on the fact that it is visible from the EJB JAR and Application ClassLoaders • No requirement for EJB Bundles to import OpenEJB • Make OpenEJB visible from Application ClassLoader Business API EJB JAR ClassLoader EJB Bundle Application ClassLoader Open EJB EJB API Page 17 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 18. Issues Running EJBs in OSGi • Locating EJBs in OSGi bundles • OSGi class loading semantics • Building EJB proxy stubs • Transaction Manager integration • JPA integration • Security integration • Miscellaneous Page 18 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 19. Implementing EJBs in OSGi • In general EJB views are implemented as proxy “stubs” • Implement a single business interface • May implement other container specific interfaces • Often implement javax.naming.Referencable • Stubs may be dynamic proxys or generated classes • In either case they must be loaded as classes • In OSGi each bundle has a different ClassLoader • There may not be any one bundle that can see all the interfaces on the proxy! Page 19 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 20. Apache Aries – OSGi safe proxy classes • Aries contains an OSGi aware proxy implementation • Supports dynamic interface implementation generation for one to N interfaces • The proxy allows a parent bundle to be specified • The proxy understands that not all interfaces may be visible to the bundle! • Aries replaces the default OpenEJB JDK Proxy factory • EJB stubs can use any mixture of interfaces Page 20 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 21. Issues Running EJBs in OSGi • Locating EJBs in OSGi bundles • OSGi class loading semantics • Building EJB proxy stubs • Transaction Manager integration • JPA integration • Security integration • Miscellaneous Page 21 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 22. EJBs and Transactions • EJBs have an extremely strong link with transactions • All invocations use a global transaction by default • More complex interactions can be configured • EJBs can control their own transactions too • In OSGi we use the JTA Service to get hold of a TransactionManager • OpenEJB knows nothing about this... Page 22 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 23. Apache Aries – JTA integration • Aries contains a JTA Service implementation that uses Geronimo's transaction manager • Also provides a TransactionSynchronizationRegistry • Aries overrides the OpenEJB transaction manager • Use the JTA Service • Provide the Tx Manager and Tx Registry • This is a clean and well used plug point Page 23 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 24. Issues Running EJBs in OSGi • Locating EJBs in OSGi bundles • OSGi class loading semantics • Building EJB proxy stubs • Transaction Manager integration • JPA integration • Security integration • Miscellaneous Page 24 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 25. EJBs and JPA • JPA replaced Entity Beans as the persistence strategy for Java EE • EJBs have tight integration with JPA • Injection via Annotations • Injection via XML • JNDI lookup in java:comp/env • EJBs may use JPA in two ways • Application Managed • Container Managed Page 25 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 26. EJBs and JPA – Application Managed • In Application managed JPA the EJB manages lifecycle • Responsible for creating and closing EntityManagers • Responsible for joining any active transactions • Adds a dependency on a named persistence unit • Injects or looks up an EntityManagerFactory • OpenEJB expects to find, create, and manage any persistence units in persistence.xml • ClassLoader problems make this impossible in OSGi Page 26 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 27. Apache Aries – Updates to Aries JPA container • Aries JPA normally uses the Meta-Persistence header to locate persistence bundles in the framework • Java EE also defines rules for finding persistence units • WARs in WEB-INF/classes, or in WEB-INF/lib • EJB JARs in META-INF • Aries JPA already checks for Web-ContextPath • Add support for the Export-EJB header too Page 27 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 28. Apache Aries – JPA integration (Application Managed) • Hide META-INF/persistence.xml from OpenEJB • Don't put the URL in the EJBModule • OpenEJB validates all EJBs to make sure that any persistence unit they use is available in the Application • Override this validation failure, Aries JPA will build it! • Listen for the registration of OSGi persistence units • If the unit is used by an EJB then bind it into the right place in java:comp/env Page 28 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 29. EJBs and JPA – Container Managed • In Container managed JPA the container manages everything! • Tx integration • Creating and closing EntityManagers • More importantly, the container propagates context • Different EJBs that use the same persistence unit in a transaction will get the same EntityManager • Aries JPA already supports this mode of operation for blueprint beans and OSGi service lookups • It does not support Extended Contexts! Page 29 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 30. EJBs and JPA – Container Managed (Extended Persistence Contexts) • Extended persistence contexts apply to Stateful Session beans (hence Aries JPA hasn't got them!) • An Extended Persistence context may start before, and lives beyond the end of a transaction • It joins any active transaction when used • It cannot replace an existing managed context • It can become the managed context for a given tx • OpenEJB is required to support this mode of operation Page 30 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 31. Apache Aries – JPA integration (Container Managed) • Replace the existing OpenEJB JPA context registry • Check for Aries JPA contexts and OpenEJB contexts • Cross register any created contexts so both agree! • Listen for the registration of OSGi persistence units • If the unit is used as a managed context in an EJB then create an OpenEJB managed EntityManager • Register this EntityManager in the relevant part of java:comp/env Page 31 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 32. Issues Running EJBs in OSGi • Locating EJBs in OSGi bundles • OSGi class loading semantics • Building EJB proxy stubs • Transaction Manager integration • JPA integration • Security integration • Miscellaneous Page 32 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 33. Java EE Security • Java EE supports fine-grained, role-based authorization • On Servlet methods • On EJB method calls • OpenEJB provides a Security Service plugpoint • Allows third party authentication/authorization engines to be used • Aries has no security component - any volunteers? • OpenEJB can cope without a Security Service • No integration at this time Page 33 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 34. Issues Running EJBs in OSGi • Locating EJBs in OSGi bundles • OSGi class loading semantics • Building EJB proxy stubs • Transaction Manager integration • JPA integration • Security integration • Miscellaneous Page 34 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 35. Issues with using OpenEJB in OSGi • OpenEJB makes extensive use of XBean internally to build things • This has the option of providing a ClassLoader • OpenEJB typically provides none • OpenEjbVersion throws an ExceptionInInitializerError • Attempts to classpath scan for properties • To work around these Aries has to extensively set the Thread Context ClassLoader when initializing OpenEJB • New JAXB code in OpenEJB needs delegating to a 2.1 JAXB implementation every time we build an app Page 35 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 36. Summary • There are a few rough edges • Some can easily be remedied in OpenEJB internals • Some support is clearly missing, but could be added • Security, Messaging, EJB lite • Broadly speaking, it works • And I can prove it! • Apache Aries Blog sample with an EJB implemented comment service! Page 36 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011
  • 37. References Apache Aries: http://aries.apache.org/ Tim Ward: @TimothyWard timothyjward@apache.org OSGi and JPA on YouTube: http://www.youtube.com/user/EnterpriseOSGi For more information on Enterprise OSGi take a look at Enterprise OSGi in Action : http://www.manning.com/cummins Page 37 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved, © IBM Corp. 2011