Apache Aries: A blueprint for developing with OSGi and JEE

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Notes on slide 1

    Introduce the subject briefly Apache Aries, very recent incubator @Apache Built around OSGi for Java EE dev => ProgModel: modular applications through OSGi using existing JEE technology at the same time Introduce yourself Working on an OSGi related project at IBM Hursley

    OSGi Alliance, Founded in 1999 Started in mobile and embedded space Sometimes feels teleported back to Java 1.0 Proven technology, highly active, revision 4.2 Execution environment on top of the JVM or embedded into some other execution environment Wide adoption (growing): Example implementations: Eclipse, Felix Built in too enterprise servers: WAS, WebLogic, Jboss Not quite the only game in town: project jigsaw in JDK 7

    Jar hell Higher level modularity Jar-file level rather than class or package Dependency declaration Versioning Benefits Maintainance Sharing without risk This is the aspect most commonly exploiting (for example in a server runtime like WAS)

    Bundles can come and go dynamically - enables more lazyness !!! - not every app can handle this transparently => use services Services: - model for loose coupling, to allow dynamic updates, Dynamic change of services, (potentially fall-over) Built-in “SOA” (low level admittedly)

    Surprisingly late addition, 2007 OSGi EEG How to access EE technology from inside OSGi Java SE and EE don't cope well with OSGi Make EE technology accessible to apps developed for OSGi Problem EE has its own assumptions about the execution environment JNDI just one example, JPA, JSP etc all have similar issues

    OSGi alliance working on number of other specs Will find a home in Apache Aries Examples: webcontainer, transactions Blueprint Standardized (by the OSGi alliance) Spring ( ! only the dependency injection part) Core dependency injection + OSGi awareness Extensible for supporting other parts that Spring simplifies

    Familiar to anyone who has used Spring before Dependency injection framework With OSGi support, in particular services Extra dynamism steroids Injected services can change overtime Injected services can temporarily be absent (without the bundle knowing) Complexity is handled by Blueprint Explain scopes and extensibility

    Scope: “prototype” -> maybe the programmer is worried about concurrency problems :)

    Updating components of an app while it is running Old state Install updated bundle Remove old bundle => blueprint automatically wires you to the new component NB: The BillingService interface should not be contained in either bundle but rather be in a third api bundle

    1 Event

    Apache Aries: A blueprint for developing with OSGi and JEE - Presentation Transcript

    1. Apache Aries A Blueprint for developing with OSGi and JEE Valentin Mahrwald, IBM
    2. What is OSGi?
      • The dynamic module system for Java
      Services Life cycle Module Execution environment S e c u r i t y Bundles Hardware / OS
    3. Modularity Services Life cycle Module Execution environment S e c u r i t y Bundles Hardware / OS System Loader Extension Loader App 1 Loader App 2 Loader WebApp 1 Loader System Loader Extension Loader Bundle A Bundle C 1 Bundle B Bundle C 2 Traditional OSGi Import-Package: org.blah.util; version=[1.0.2,2.0.0) Export-Package: org.blah.util; version=1.5.0 Export-Package: org.blah.util; version=2.0.0
    4. Dynamics
      • Bundle life cycle
      • Services
      Services Life cycle Module Execution environment S e c u r i t y Bundles Hardware / OS Bundle A Bundle B Bundle C S S'
    5. Enterprise OSGi
      • Java SE and EE technologies are often not OSGi aware
      Apache Aries JNDI Glue OSGI
    6. Apache Aries
      • Recent addition to Apache incubator
      • OSGi as an application model
        • Blueprint (standardized Spring)
        • JNDI integration
        • more to come
    7. Blueprint Example
      • E-Commerce bundle
      • <blueprint> <bean id=”shop” class=”org.example.ecomm.ShopImpl”> <property name=”billingService” ref=”billingService” /> </bean> <reference id=”billingService” interface=”org.example.bill.BillingService” /> </blueprint>
      class ShopImpl { private BillingService billingService; void setBillingService(BillingService srv) { … } void process(Order o) { … billingService.bill(o); … } } E-commerce
    8. Blueprint Example (2)
      • Billing service bundle
      • <blueprint> <service ref=”service” interface=”org.example.bill.BillingService” /> <bean id=”service” scope=”prototype” class=”org.example.bill.impl.BillingServiceImpl” /> </blueprint>
      class BilingServiceImpl implements BillingService { … void bill(Order o) { … } … } Billing
    9. Blueprint dynamics E-commerce Billing [1.0.0] Billing [1.0.0] Billing [1.0.1] Billing [1.0.1] E-commerce E-commerce BP component
    10. Where To Start
      • OSGi Alliance
        • http://www.osgi.org
      • OSGi implementations
        • http://www.eclipse.org/equinox/
        • http://felix.apache.org/
      • Apache Aries
        • http://incubator.apache.org/aries/
    11. Thanks! Questions?
    SlideShare Zeitgeist 2009

    + mahrwaldmahrwald Nominate

    custom

    198 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 198
      • 198 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 6
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events