SlideShare une entreprise Scribd logo
1  sur  52
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?
[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?
[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?OpenStack Korea Community
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기Ian Choi
 
インストールしてみたWindows Server 2019 on VirtualBox
インストールしてみたWindows Server 2019 on VirtualBoxインストールしてみたWindows Server 2019 on VirtualBox
インストールしてみたWindows Server 2019 on VirtualBoxShin Tanigawa
 
OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作irix_jp
 
Red Hat OpenStack 17 저자직강+스터디그룹_1주차
Red Hat OpenStack 17 저자직강+스터디그룹_1주차Red Hat OpenStack 17 저자직강+스터디그룹_1주차
Red Hat OpenStack 17 저자직강+스터디그룹_1주차Nalee Jang
 
오픈스택 기반 클라우드 서비스 구축 방안 및 사례
오픈스택 기반 클라우드 서비스 구축 방안 및 사례오픈스택 기반 클라우드 서비스 구축 방안 및 사례
오픈스택 기반 클라우드 서비스 구축 방안 및 사례SONG INSEOB
 
IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向Yuya Rin
 
Happy Windows Automation with Ansible
Happy Windows Automation with AnsibleHappy Windows Automation with Ansible
Happy Windows Automation with Ansiblesugoto
 
Advantages of SUSE Linux Over Windows
Advantages of SUSE Linux Over WindowsAdvantages of SUSE Linux Over Windows
Advantages of SUSE Linux Over WindowsJeff Reser
 
Authenticating Angular Apps with JWT
Authenticating Angular Apps with JWTAuthenticating Angular Apps with JWT
Authenticating Angular Apps with JWTJennifer Estrada
 
Terraform: Infrastructure as Code
Terraform: Infrastructure as CodeTerraform: Infrastructure as Code
Terraform: Infrastructure as CodePradeep Bhadani
 
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Nalee Jang
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 
Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Installboyw165
 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksCoreStack
 

Tendances (20)

[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?
[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?
[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
 
インストールしてみたWindows Server 2019 on VirtualBox
インストールしてみたWindows Server 2019 on VirtualBoxインストールしてみたWindows Server 2019 on VirtualBox
インストールしてみたWindows Server 2019 on VirtualBox
 
入門Ansible
入門Ansible入門Ansible
入門Ansible
 
OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作
 
Red Hat OpenStack 17 저자직강+스터디그룹_1주차
Red Hat OpenStack 17 저자직강+스터디그룹_1주차Red Hat OpenStack 17 저자직강+스터디그룹_1주차
Red Hat OpenStack 17 저자직강+스터디그룹_1주차
 
오픈스택 기반 클라우드 서비스 구축 방안 및 사례
오픈스택 기반 클라우드 서비스 구축 방안 및 사례오픈스택 기반 클라우드 서비스 구축 방안 및 사례
오픈스택 기반 클라우드 서비스 구축 방안 및 사례
 
IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向
 
Docker + WASM.pdf
Docker + WASM.pdfDocker + WASM.pdf
Docker + WASM.pdf
 
Happy Windows Automation with Ansible
Happy Windows Automation with AnsibleHappy Windows Automation with Ansible
Happy Windows Automation with Ansible
 
Ansible
AnsibleAnsible
Ansible
 
Advantages of SUSE Linux Over Windows
Advantages of SUSE Linux Over WindowsAdvantages of SUSE Linux Over Windows
Advantages of SUSE Linux Over Windows
 
Authenticating Angular Apps with JWT
Authenticating Angular Apps with JWTAuthenticating Angular Apps with JWT
Authenticating Angular Apps with JWT
 
Terraform: Infrastructure as Code
Terraform: Infrastructure as CodeTerraform: Infrastructure as Code
Terraform: Infrastructure as Code
 
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Install
 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling works
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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