SlideShare a Scribd company logo
1 of 52
Download to read offline
Karaf - When OSGI modularity
     meets Java EE world


           Charles Moulliard
                   &
          Romain Manni-Bucau
Agenda
●   Modularity
●   OSGI EE
●   Java EE
●   All together
●   Conclusion
Speaker : Charles Moulliard
●   Engineer in Agronomy & Master in Zoology
●   Project Manager & Architect for banking sector
●   Solution Architect & Consultant @RedHat
●   Committer → Karaf (PMC), Camel (PMC),
    ServiceMix, DeltaSpike, Fabric
         @cmoulliard
          http://www.linkedin.com/in/charlesmoulliard
          http://cmoulliard.blogspot.com
          http://www.slideshare.net/cmoulliard
Speaker : Romain Manni-Bucau
●   Java and JavaEE developer
●   Participates to Apache OpenEJB & TomEE
    since 2011
●   His professional area is particularly linked to
    banks and insurances
●   His development environment mainly
    consists of Open Source & Apache projects
    (TomEE, Karaf, ...)
    ●
Introduction
to Modularity
What does modularity means ?
 ●   Open Standard Gateway Initiative exists
     since 1999
 ●   Initially conceived to create dynamic
     environments for the “home gateway”
 ●   Lead by Telco, IT vendors
 ●   Class-loading isolation
 ●   Dependency control, versioning
What does modularity means ?

   ●   Function → Class
   ●   Class → Interface
   ●   Classes → Jar
   ●   Jar → Bundle (a Module)
   ●   Bundle has a lifecycle !
What does modularity means ?
What does modularity means ?
                   Replace bundle by a new




Dependencies
  & versions
   checked
                                           BundleActivator,
                                         Blueprint, SpringDM
                                                iPOJO
What does modularity means ?
●   OSGI Architecture introduces core concepts:
    –   Execution Environment
    –   Modules (bundles) & lifecycle
    –   Services & Service Registry
What does modularity means ?
●   How modularity is expressed
    → METADATA added in MANIFEST.mf file
What does modularity means ?
●   And of course : Import & Export Package
What does modularity means ?
Apache Karaf
 ●   Birthdate - 16th of June 2010
 ●   Platform running on OSGI (Apache Felix, Eclipse
      Equinox)
 ●   Provides a lightweight container where
     ●   Applications, Integration projects
     ●   Web Service, JMS Brokers
     ●   Java applications
         can be deployed
 ●   Used by ServiceMix, Geronimo projects
Apache Karaf
Enterprise Service Bus   Java OSGI
Apache Karaf
  ●   Administration console (locale, remote, ssh,
       web, jmx)
  ●   Provisioning system (features)
  ●   Hot deployment and configuration
       management (properties)
  ●   Instances management
  ●   Security integration (JAAS → ldap, jdbc, file)
  ●   Logging unification (log4j, logger, commons
       logging, ….)
Quick Apache Karaf demo
Is there an alternative ?
Java Jigsaw vision
   ●   Jigsaw project seems like
       Loch Ness Monster
   ●   Announced since Java SE 7
       & now -> Java SE 9
       in 2015
   ●   Faced to issues
       (backward compatibility)
Java Jigsaw vision
●   CLASSPATH death
●   New Class format
●   Static linkage (<= Java card – 1996)
●   Byte code verification step moved to speed
    process
●   JDK will have a system module library in
    which the platform modules are installed
Java Jigsaw vision
 ●   Dependency defined --> module-info.java
     file
      module com.greetings @ 0.1 {
          requires jdk.base;
          requires org.astro @ 1.2;
          class com.greetings.Hello;
      }
Java Jigsaw vision
●   Managed using specific commands


    jmod -L mlib create # this creates module lib "mlib"
    jmod -L mlib install modules org.astro com.greetings
    rm -rf mlib/com.greetings
    java -L mlib -m com.greetings
OSGI EE

Extend Modularity with
  enterprise features
OSGI EE
●   OSGI is not only a specification defining a
    “modular” architecture
●   Embrace EE world
●   Provide support for Java standards :
    –   JPA, JNDI, Web (HTTP), JTA, JDBC
    –   Soon CDI, EJB
OSGI EE

 ●   Implemented by Apache Aries



 ●   But also OPS4J - Pax
What is OSGI EE ?
 ●   OSGI services (Java Interfaces)
 ●   JPA, JTA OSGI containers
 ●   Web OSGI container
 ●   Blueprint (IoC) to configure services, beans and
     access services
 ●   But also
     –   JNDI (wrapper)
     –   SpiFly (Java ServiceLoader – static/dynamic)
     –   Applications isolation (EBA)
Enterprise Service Bus   Java OSGI EE




                             OSGI EE

                                 JPA, JTA, JNDI, JDBC
What is OSGI EE ?
 ●   A typical architecture

                      Apache Karaf
              Java Service            Java DAO

                Blueprint              Blueprint
                       OSGI Services
                       JPA             Tx



                   <bean id="conferenceService"
         DB        class="org.apache.conf2012.service.impl.ConferenceService">
                         <property name="conferenceDAO">
                           <reference interface="org.apache.conf2012.service.ConferenceDAO"/>
                         </property>
                   </bean>
What is OSGI EE ?
 ●   Architecture enriched with Web layer

                             Apache Karaf
           Java DAO               Java Service     Web

             Blueprint           Blueprint       Blueprint
                      OSGI Services
                    JPA            Tx




                    DB
                                                             Simply HTML artifacts,
                                                                web framework
What is OSGI EE ?
●   Using Camel for Integration

                                Apache Karaf
                                                         File, WS, Rest,
                                                         JMS
        Java DAO               Java Service
                                                      Camel
         Blueprint            Blueprint
                   OSGI Services
                JPA             Tx                          Bean




                DB                             from(“file://apacheCon2012”)
                                               .unmarshall(“csv”)
                                               .beanRef(“insertConference”);
What is OSGI EE ?
 ●   Persistence
What is OSGI EE ?
 ●   DAO
What is OSGI EE ?
 ●   DAO (Spring/Blueprint) using JPA/Hibernate
What is OSGI EE ?
 ●   Service
Java EE
Java EE - Specs
 ●   JSR 907 (JTA)
 ●   JSR 196 (JAAS)
 ●   JSR 115 (JACC)
 ●   JavaMail
 ●   JSR 338 (JPA)
 ●   JSR 303 (Bean Validation)
 ●   JSR 299 + 330 (CDI)
 ●   JSR 318 (EJB)
Java EE – Specs (next)
 ●   JSR 315 (servlet)
 ●   JSR 245 (JSP)
 ●   JSR 344 (JSF)
 ●   JSR 914 (JMS)
 ●   JSR 339 (JAX-RS)
 ●   JSR 224 (JAX-WS)
 ●   Connector
Java EE & Apache
 ●   Supported by Apache foundation projects
     OpenJPA
     OpenEJB
     OpenWebbeans
     DeltaSpike
     ActiveMQ
     CXF, Camel
     Tomcat, MyFaces
Java EE - Concepts

                                   @EntityManager
  Transactions
                     JAX-WS

   @Resource                    JAX-REST

                            JAAS
  Pooling


      @Inject
                     Endpoint      PersistenceUnit
When Java EE
meets OSGI
Java EE on Karaf
 ●   What is required
     –   A Karaf runtime
     –   Features (= provisioning)
     –   New Karaf command (optional)
 ●   Follow Java EE specs & development
     guidelines
Karaf plus EE
 ●   Features →
     Java EE api + OpenEJB + OpenWebbeans +
     OpenJPA
 ●   Turn on your Karaf into Java EE world :
     CDI + EJB3 + JPA + JTA + ...
Enterprise Service Bus   Java EE world




                         EE
                              CDI, EJB, JPA, JTA
Karaf EE Architecture
 ●   Architecture (JPA, EJB, CDI)

                             Apache Karaf
           Java Service           Java DAO            Web
                                                   Framework
                CDI                   CDI             HTTP
                      OSGI Services

            OpenJPA       OpenEJB           JTA


                          …
                          @Inject
           DB             @Startup
                          @Singleton
                          Conference DAO MyConferenceDAO
                          ….
Karaf with EE - Example
 ●   Pers
     istence
Karaf with EE - Example
 ●   Entity
Karaf with EE - Example
 ●   DAO
Karaf with EE - Example
 ●   Service
DEMO & Conclusion
●   Karaf EE = Combine multi-lightweight
    containers of Karaf with Java EE world
●   Allow to develop modular projects
●   Capitalize your Java EE knowledge
●   Convergence between, best of both
    technologies OSGI & Java EE
Questions
                               @cmoulliard
                               @rmannibucau




  Karaf with EE
  http://repo1.maven.org/maven2/org/apache
  /openejb/apache-karafee/
  https://github.com/cmoulliard/apachecon-
  2012/tree/master/karafee

More Related Content

What's hot

Active dataguard
Active dataguardActive dataguard
Active dataguardManoj Kumar
 
Postgresql Database Administration- Day3
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3PoguttuezhiniVP
 
AutoUpgrade and Best Practices
AutoUpgrade and Best PracticesAutoUpgrade and Best Practices
AutoUpgrade and Best PracticesJitendra Singh
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance TuningMaven Logix
 
Getting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentationGetting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentationBerry Clemens
 
Achieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAAAchieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAAMarkus Michalewicz
 
[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdfJo Hoon
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellN Masahiro
 
Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015Samuel De Rycke
 
ORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesJustin Michael Raj
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle MultitenantJitendra Singh
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DaliaAboSheasha
 
Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15Bobby Curtis
 
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드confluent
 
Connection Pooling in PostgreSQL using pgbouncer
Connection Pooling in PostgreSQL using pgbouncer Connection Pooling in PostgreSQL using pgbouncer
Connection Pooling in PostgreSQL using pgbouncer Sameer Kumar
 
Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0EDB
 
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...Lucidworks
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMarkus Michalewicz
 

What's hot (20)

Active dataguard
Active dataguardActive dataguard
Active dataguard
 
Postgresql Database Administration- Day3
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3
 
AutoUpgrade and Best Practices
AutoUpgrade and Best PracticesAutoUpgrade and Best Practices
AutoUpgrade and Best Practices
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance Tuning
 
Getting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentationGetting optimal performance from oracle e-business suite presentation
Getting optimal performance from oracle e-business suite presentation
 
Achieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAAAchieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAA
 
[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf[GitOps] Argo CD on GKE (v0.9.2).pdf
[GitOps] Argo CD on GKE (v0.9.2).pdf
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshell
 
Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015
 
ORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesORDS - Oracle REST Data Services
ORDS - Oracle REST Data Services
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11
 
Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15
 
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드
 
Connection Pooling in PostgreSQL using pgbouncer
Connection Pooling in PostgreSQL using pgbouncer Connection Pooling in PostgreSQL using pgbouncer
Connection Pooling in PostgreSQL using pgbouncer
 
Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0Active/Active Database Solutions with Log Based Replication in xDB 6.0
Active/Active Database Solutions with Log Based Replication in xDB 6.0
 
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
Building a Solr Continuous Delivery Pipeline with Jenkins: Presented by James...
 
Backup and-recovery2
Backup and-recovery2Backup and-recovery2
Backup and-recovery2
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
 

Viewers also liked

OSGi & Java EE in GlassFish
OSGi & Java EE in GlassFishOSGi & Java EE in GlassFish
OSGi & Java EE in GlassFishSanjeeb Sahoo
 
Weld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGiWeld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGiMathieu Ancelin
 
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
 
Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafIoan Eugen Stan
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in PractiseDavid Bosschaert
 
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010Adrian Trenaman
 
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
 
The Role of Enterprise Integration in Digital Transformation
The Role of Enterprise Integration in Digital TransformationThe Role of Enterprise Integration in Digital Transformation
The Role of Enterprise Integration in Digital TransformationKasun Indrasiri
 

Viewers also liked (8)

OSGi & Java EE in GlassFish
OSGi & Java EE in GlassFishOSGi & Java EE in GlassFish
OSGi & Java EE in GlassFish
 
Weld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGiWeld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGi
 
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
 
Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache Karaf
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
 
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
 
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 ...
 
The Role of Enterprise Integration in Digital Transformation
The Role of Enterprise Integration in Digital TransformationThe Role of Enterprise Integration in Digital Transformation
The Role of Enterprise Integration in Digital Transformation
 

Similar to Karaf ee-apachecon eu-2012

Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture TrendsSrini Penchikala
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Arun Gupta
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Arun Gupta
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopArun Gupta
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Charles Moulliard
 
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
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Codecamp Romania
 
OSGi as Enterprise Integration Platform
OSGi as Enterprise Integration PlatformOSGi as Enterprise Integration Platform
OSGi as Enterprise Integration PlatformDPC Consulting Ltd
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SEdogangoko
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusArun Gupta
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Arun Gupta
 
Why should i switch to Java SE 7
Why should i switch to Java SE 7Why should i switch to Java SE 7
Why should i switch to Java SE 7Vinay H G
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaArun Gupta
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)Arun Gupta
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudArun Gupta
 
OSGi DevCon US 2010 Review
OSGi DevCon US 2010 ReviewOSGi DevCon US 2010 Review
OSGi DevCon US 2010 Reviewmfrancis
 

Similar to Karaf ee-apachecon eu-2012 (20)

Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture Trends
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
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
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
Java EE for the Cloud
Java EE for the CloudJava EE for the Cloud
Java EE for the Cloud
 
OSGi as Enterprise Integration Platform
OSGi as Enterprise Integration PlatformOSGi as Enterprise Integration Platform
OSGi as Enterprise Integration Platform
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SE
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
 
Why should i switch to Java SE 7
Why should i switch to Java SE 7Why should i switch to Java SE 7
Why should i switch to Java SE 7
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
OSGi DevCon US 2010 Review
OSGi DevCon US 2010 ReviewOSGi DevCon US 2010 Review
OSGi DevCon US 2010 Review
 

More from Charles Moulliard

Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakCharles Moulliard
 
Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Charles Moulliard
 
Develop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backendDevelop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backendCharles Moulliard
 
Security enforcement of Microservices with API Management
Security enforcement of Microservices with API ManagementSecurity enforcement of Microservices with API Management
Security enforcement of Microservices with API ManagementCharles Moulliard
 
MicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelMicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelCharles Moulliard
 
Design a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST BackendDesign a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST BackendCharles Moulliard
 
Continuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on OpenshiftContinuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on OpenshiftCharles Moulliard
 
Development of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & HawtioDevelopment of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & HawtioCharles Moulliard
 
iPaas with Fuse Fabric Technology
iPaas with Fuse Fabric TechnologyiPaas with Fuse Fabric Technology
iPaas with Fuse Fabric TechnologyCharles Moulliard
 
Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012Charles Moulliard
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCharles Moulliard
 
Fusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliardFusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliardCharles Moulliard
 
Fusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardFusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardCharles Moulliard
 
Devoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemqDevoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemqCharles Moulliard
 
Be jug 090611_apacheservicemix
Be jug 090611_apacheservicemixBe jug 090611_apacheservicemix
Be jug 090611_apacheservicemixCharles Moulliard
 
Fuse source parisjug-10052011
Fuse source parisjug-10052011Fuse source parisjug-10052011
Fuse source parisjug-10052011Charles Moulliard
 
Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration Charles Moulliard
 

More from Charles Moulliard (18)

Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & Keycloak
 
Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016
 
Develop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backendDevelop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backend
 
Security enforcement of Microservices with API Management
Security enforcement of Microservices with API ManagementSecurity enforcement of Microservices with API Management
Security enforcement of Microservices with API Management
 
MicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelMicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache Camel
 
Design a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST BackendDesign a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST Backend
 
Fuse technology-2015
Fuse technology-2015Fuse technology-2015
Fuse technology-2015
 
Continuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on OpenshiftContinuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on Openshift
 
Development of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & HawtioDevelopment of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & Hawtio
 
iPaas with Fuse Fabric Technology
iPaas with Fuse Fabric TechnologyiPaas with Fuse Fabric Technology
iPaas with Fuse Fabric Technology
 
Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Fusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliardFusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliard
 
Fusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardFusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliard
 
Devoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemqDevoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemq
 
Be jug 090611_apacheservicemix
Be jug 090611_apacheservicemixBe jug 090611_apacheservicemix
Be jug 090611_apacheservicemix
 
Fuse source parisjug-10052011
Fuse source parisjug-10052011Fuse source parisjug-10052011
Fuse source parisjug-10052011
 
Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration
 

Karaf ee-apachecon eu-2012

  • 1. Karaf - When OSGI modularity meets Java EE world Charles Moulliard & Romain Manni-Bucau
  • 2. Agenda ● Modularity ● OSGI EE ● Java EE ● All together ● Conclusion
  • 3. Speaker : Charles Moulliard ● Engineer in Agronomy & Master in Zoology ● Project Manager & Architect for banking sector ● Solution Architect & Consultant @RedHat ● Committer → Karaf (PMC), Camel (PMC), ServiceMix, DeltaSpike, Fabric @cmoulliard http://www.linkedin.com/in/charlesmoulliard http://cmoulliard.blogspot.com http://www.slideshare.net/cmoulliard
  • 4. Speaker : Romain Manni-Bucau ● Java and JavaEE developer ● Participates to Apache OpenEJB & TomEE since 2011 ● His professional area is particularly linked to banks and insurances ● His development environment mainly consists of Open Source & Apache projects (TomEE, Karaf, ...) ●
  • 6. What does modularity means ? ● Open Standard Gateway Initiative exists since 1999 ● Initially conceived to create dynamic environments for the “home gateway” ● Lead by Telco, IT vendors ● Class-loading isolation ● Dependency control, versioning
  • 7. What does modularity means ? ● Function → Class ● Class → Interface ● Classes → Jar ● Jar → Bundle (a Module) ● Bundle has a lifecycle !
  • 9. What does modularity means ? Replace bundle by a new Dependencies & versions checked BundleActivator, Blueprint, SpringDM iPOJO
  • 10. What does modularity means ? ● OSGI Architecture introduces core concepts: – Execution Environment – Modules (bundles) & lifecycle – Services & Service Registry
  • 11. What does modularity means ? ● How modularity is expressed → METADATA added in MANIFEST.mf file
  • 12. What does modularity means ? ● And of course : Import & Export Package
  • 14. Apache Karaf ● Birthdate - 16th of June 2010 ● Platform running on OSGI (Apache Felix, Eclipse Equinox) ● Provides a lightweight container where ● Applications, Integration projects ● Web Service, JMS Brokers ● Java applications can be deployed ● Used by ServiceMix, Geronimo projects
  • 17. Apache Karaf ● Administration console (locale, remote, ssh, web, jmx) ● Provisioning system (features) ● Hot deployment and configuration management (properties) ● Instances management ● Security integration (JAAS → ldap, jdbc, file) ● Logging unification (log4j, logger, commons logging, ….)
  • 19. Is there an alternative ?
  • 20. Java Jigsaw vision ● Jigsaw project seems like Loch Ness Monster ● Announced since Java SE 7 & now -> Java SE 9 in 2015 ● Faced to issues (backward compatibility)
  • 21. Java Jigsaw vision ● CLASSPATH death ● New Class format ● Static linkage (<= Java card – 1996) ● Byte code verification step moved to speed process ● JDK will have a system module library in which the platform modules are installed
  • 22. Java Jigsaw vision ● Dependency defined --> module-info.java file module com.greetings @ 0.1 { requires jdk.base; requires org.astro @ 1.2; class com.greetings.Hello; }
  • 23. Java Jigsaw vision ● Managed using specific commands jmod -L mlib create # this creates module lib "mlib" jmod -L mlib install modules org.astro com.greetings rm -rf mlib/com.greetings java -L mlib -m com.greetings
  • 24. OSGI EE Extend Modularity with enterprise features
  • 25. OSGI EE ● OSGI is not only a specification defining a “modular” architecture ● Embrace EE world ● Provide support for Java standards : – JPA, JNDI, Web (HTTP), JTA, JDBC – Soon CDI, EJB
  • 26. OSGI EE ● Implemented by Apache Aries ● But also OPS4J - Pax
  • 27. What is OSGI EE ? ● OSGI services (Java Interfaces) ● JPA, JTA OSGI containers ● Web OSGI container ● Blueprint (IoC) to configure services, beans and access services ● But also – JNDI (wrapper) – SpiFly (Java ServiceLoader – static/dynamic) – Applications isolation (EBA)
  • 28. Enterprise Service Bus Java OSGI EE OSGI EE JPA, JTA, JNDI, JDBC
  • 29. What is OSGI EE ? ● A typical architecture Apache Karaf Java Service Java DAO Blueprint Blueprint OSGI Services JPA Tx <bean id="conferenceService" DB class="org.apache.conf2012.service.impl.ConferenceService"> <property name="conferenceDAO"> <reference interface="org.apache.conf2012.service.ConferenceDAO"/> </property> </bean>
  • 30. What is OSGI EE ? ● Architecture enriched with Web layer Apache Karaf Java DAO Java Service Web Blueprint Blueprint Blueprint OSGI Services JPA Tx DB Simply HTML artifacts, web framework
  • 31. What is OSGI EE ? ● Using Camel for Integration Apache Karaf File, WS, Rest, JMS Java DAO Java Service Camel Blueprint Blueprint OSGI Services JPA Tx Bean DB from(“file://apacheCon2012”) .unmarshall(“csv”) .beanRef(“insertConference”);
  • 32. What is OSGI EE ? ● Persistence
  • 33. What is OSGI EE ? ● DAO
  • 34. What is OSGI EE ? ● DAO (Spring/Blueprint) using JPA/Hibernate
  • 35. What is OSGI EE ? ● Service
  • 37. Java EE - Specs ● JSR 907 (JTA) ● JSR 196 (JAAS) ● JSR 115 (JACC) ● JavaMail ● JSR 338 (JPA) ● JSR 303 (Bean Validation) ● JSR 299 + 330 (CDI) ● JSR 318 (EJB)
  • 38. Java EE – Specs (next) ● JSR 315 (servlet) ● JSR 245 (JSP) ● JSR 344 (JSF) ● JSR 914 (JMS) ● JSR 339 (JAX-RS) ● JSR 224 (JAX-WS) ● Connector
  • 39. Java EE & Apache ● Supported by Apache foundation projects OpenJPA OpenEJB OpenWebbeans DeltaSpike ActiveMQ CXF, Camel Tomcat, MyFaces
  • 40. Java EE - Concepts @EntityManager Transactions JAX-WS @Resource JAX-REST JAAS Pooling @Inject Endpoint PersistenceUnit
  • 42. Java EE on Karaf ● What is required – A Karaf runtime – Features (= provisioning) – New Karaf command (optional) ● Follow Java EE specs & development guidelines
  • 43. Karaf plus EE ● Features → Java EE api + OpenEJB + OpenWebbeans + OpenJPA ● Turn on your Karaf into Java EE world : CDI + EJB3 + JPA + JTA + ...
  • 44. Enterprise Service Bus Java EE world EE CDI, EJB, JPA, JTA
  • 45. Karaf EE Architecture ● Architecture (JPA, EJB, CDI) Apache Karaf Java Service Java DAO Web Framework CDI CDI HTTP OSGI Services OpenJPA OpenEJB JTA … @Inject DB @Startup @Singleton Conference DAO MyConferenceDAO ….
  • 46. Karaf with EE - Example ● Pers istence
  • 47. Karaf with EE - Example ● Entity
  • 48. Karaf with EE - Example ● DAO
  • 49. Karaf with EE - Example ● Service
  • 51. Karaf EE = Combine multi-lightweight containers of Karaf with Java EE world ● Allow to develop modular projects ● Capitalize your Java EE knowledge ● Convergence between, best of both technologies OSGI & Java EE
  • 52. Questions @cmoulliard @rmannibucau Karaf with EE http://repo1.maven.org/maven2/org/apache /openejb/apache-karafee/ https://github.com/cmoulliard/apachecon- 2012/tree/master/karafee