SlideShare a Scribd company logo
1 of 27
Download to read offline
<Insert Picture Here>




OSGi & Java EE in GlassFish
Arun Gupta, Java EE & GlassFish Guy
blogs.sun.com/arungupta, @arungupta
The following/preceding is intended to outline our
general product direction. It is intended for
information purposes only, and may not be
incorporated into any contract. It is not a
commitment to deliver any material, code, or
functionality, and should not be relied upon in
making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.



                                                     2
Are you tweeting ?



#glassfish
#techdays


                     3
The OSGi Alliance is a worldwide
consortium of technology
innovators that advances a proven
and mature process to assure
interoperability of applications and
services based on its component
integration platform.
                                       4
OSGi Alliance provides ...

• Specifications
• Reference Implementation
• Test Suites
• Certifications




                               5
What is OSGi ?

• Specification delivered by OSGi Alliance
  • Originally for embedded devices and networks
• Architecture for modular application development
  in Java
• Reduces the cost of building, maintaining, and
  deploying applications




                                                     6
What is OSGi ?

• OSGi “container” breaks application into “modules”
 or “bundles”
  • Felix, Equinox, Knopflerfish
• Dependencies between each bundle are managed
• Can install, uninstall, start, and stop each bundle
 dynamically without restarting container
  • Multiple versions of a bundle are supported




                                                    7
GlassFish v3 & OSGi
• No OSGi APIs are used in GlassFish
  • HK2 provides abstraction layer
• All GlassFish modules are OSGi bundles
• Felix is default, also runs on Knopflerfish &
 Equinox
  • Can run in an existing shell
  • 216 modules in v3




http://blogs.sun.com/arungupta/entry/totd_103_glassfish_v3_with   8
Benefits of OSGi for GlassFish
• Demands and enforces stronger modularity
• Enables custom tailored App server
• Lazy loading based on usage patterns
• Open for all JVM based technologies
  • Native deployment of JRuby-on-Rails application
• Successfully maintained quick startup
• Available to GlassFish developers and
 users


                                                      9
GlassFish: The next generation platform

   REST                                OpenMQ          WebSpace Server
                   Scripting                                                 OpenESB             OpenSSO
Web Services                            JMS                Portal


   Web                               Connection             Java                               Web Services
                       JSF                                                 EJB Container

                       Application Container
 Container                          Pooling (JCA)        Persistence                             Interop



         Management Console                   Update Center                     Management CLI



      Naming                               Grizzly Framework                                Monitoring/
                        Injection
      Service Config          Deploy
                        Manager
                                            Security           Monitor Configuration
                                                                              Cluster      Serviceability/
                                                                                             Logging

                                          GlassFish V3 Core
    Transaction          Security         (Module Subsystem)
      Service            Service                                        Deployment           Clustering




                                                OSGi
                                                Java SE
                                                                                                             10
GlassFish v3 Runtime with OSGi


  GlassFish V3 modules
   GlassFish V3 modules           Random OSGi Bundle
                                   Random OSGi Bundle
 (OSGi + extra metadata)
  (OSGi + extra metadata)

                            Service        OSGi
                                            OSGi
   HK2 Service layer
   HK2 Service layer        Mapper     Service Layer
                                        Service Layer



               OSGi Bundle management
               OSGi Bundle management



                                                        11
Create an OSGi Bundle – Using Maven

 • Create a Maven project
 • Implement “BundleActivator”
 • Update “pom.xml”
    • Change packaging to “bundle”
    • Add dependencies on OSGI APIs
    • Use “maven-bundle-plugin” to package
 • Build the bundle




http://blogs.sun.com/arungupta/entry/totd_36_deploy_osgi_bundles


                                                                   12
OSGi Bundle Management in GlassFish
• asadmin deploy –type osgi
• “cp” / “rm” glassfish/modules/autostart directory
• telnet localhost 6666
• Apache Felix Web Console
• REST Console bundle
• Perl-based shell (Osgish)




http://blogs.sun.com/arungupta/entry/totd_118_managing_osgi_bundles

                                                                      13
14
Why OSGi in Enterprise Apps ?

• Improved modularity
   • Reusable bundles
   • Dependencies are more visible
   • Better isolation / Cleaner class loading model
   • Better version control
   • Faster deployment cycle
• Better tools for deployment
• Observable bundle life cycle
• Service Tracking
• Criteria-based service selection




                                                      15
Why Java EE in Enterprise Apps ?

• Better API (JPA, JTA, JAXB, JNDI)
• Better component model (Servlet, EJB, JAX-RS)
• Better frameworks (JSF, CDI)
• Ease-of-use (Annotations, Convention-over-configuration)
• Platform provided integrated infrastructure services
   • Transaction, Security, Persistence, Remoting, ...
• Many more reasons ...




                                                         16
Hybrid Applications

“A hybrid application is an OSGi
bundle as well as a Java EE
archive and hence has both an
OSGi bundle context and Java EE c
ontext at runtime and can leverage
capabilities of both the platforms.”


                                   17
Why Hybrid Apps ?




       Best of both worlds!!!
Why do you want to learn new APIs ?




                                 18
Role of GlassFish

• Provides a runtime for Hybrid Applications
• Implements Java EE related OSGi services and
  standards
• Don't have to assemble the bits
• OSGi is no longer under the cover
  • Raises visibility from GlassFish developers to users




                                                           19
Enterprise OSGi API in GlassFish

• OSGi/HTTP Service
• OSGi/Web Application (rfc #66)
• OSGi/EJB
• OSGi/JDBC (rfc #122)
• OSGi/JPA
• OSGi/JTA (rfc #98)




 Work in Progress (in trunk), some of it already in v3.


                                                          20
OSGi/Web Application (rfc #66)

• Web Application Bundle (WAB)
  • WAR + OSGi + Web-ContextPath Header
  • Can use all enterprise APIs include JPA with lazy loading
  • Sample manifest:
    Manifest-Version: 1.0
    Import-Package: javax.servlet.http; javax.persistence
    Bundle-ClassPath: WEB-INF/classes/,WEB-INF/lib/entities.jar
    Bundle-Version: 1.0
    Bundle-ManifestVersion: 2
    Web-ContextPath: /hello
    Bundle-SymbolicName: test.hellowab

• Wrapped WAR Support
  • webbundle: URL scheme


                                                                  21
Hybrid Applications - Demo

 • OSGi services in Java EE
      @Resource(mappedName=”osgiName”)
      SomeOSGiService osgiService;
    • JNDI Lookup
    • Portable, no OSGi dependencies in application
 • Exported APIs visible to Java EE apps




http://blogs.sun.com/arungupta/entry/totd_124_osgi_declarative_services

                                                                     22
Extending GlassFish v3
    Using Spring dm Container


                                           • Simple Spring bean
                                             implementing the
                                             service
                                           • Invoke the service
                                             from a servlet using
                                             standard @Resource
                                             injection
                                           • Single runtime for
                                             both Spring and full
                                             Java EE


http://blogs.sun.com/dochez/entry/glassfish_v3_extensions_part_4   23
Create an OSGi bundle - NetBeans




                                   24
Looking Forward

• GlassFish v3
 •   Support OSGi-Enabled Java EE applications
 •   Implement Java EE-related OSGi services
 •   Expose Java EE services as OSGi services
 •   Improve underlying OSGi framework administration




                                                        25
References

• glassfish.org
• blogs.sun.com/theaquarium
• twitter.com/glassfish
• glassfish@sun.com




                              26
<Insert Picture Here>




OSGi & Java EE in GlassFish
Arun Gupta, Java EE & GlassFish Guy
blogs.sun.com/arungupta, @arungupta

More Related Content

What's hot

GlassFish OSGi Server
GlassFish OSGi ServerGlassFish OSGi Server
GlassFish OSGi ServerArtur Alves
 
GlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox FelixGlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox FelixLudovic Champenois
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Arun Gupta
 
OSGi & Java EE in GlassFish
OSGi & Java EE in GlassFishOSGi & Java EE in GlassFish
OSGi & Java EE in GlassFishSanjeeb Sahoo
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011Arun Gupta
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011Arun Gupta
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the CloudArun Gupta
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
Glassfish An Introduction
Glassfish An IntroductionGlassfish An Introduction
Glassfish An IntroductionJumping Bean
 
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUGGlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUGArun Gupta
 
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
 
Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011Agora Group
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012Arun Gupta
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011Arun Gupta
 

What's hot (20)

GlassFish OSGi Server
GlassFish OSGi ServerGlassFish OSGi Server
GlassFish OSGi Server
 
GlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox FelixGlassFish v3, OSGi Equinox Felix
GlassFish v3, OSGi Equinox Felix
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
OSGi & Java EE in GlassFish
OSGi & Java EE in GlassFishOSGi & Java EE in GlassFish
OSGi & Java EE in GlassFish
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
Glassfish An Introduction
Glassfish An IntroductionGlassfish An Introduction
Glassfish An Introduction
 
GlassFish v3 - Architecture
GlassFish v3 - ArchitectureGlassFish v3 - Architecture
GlassFish v3 - Architecture
 
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUGGlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUG
 
GlassFish v3 Prelude Aquarium Paris
GlassFish v3 Prelude Aquarium ParisGlassFish v3 Prelude Aquarium Paris
GlassFish v3 Prelude Aquarium Paris
 
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
Modular JavaModular Java
Modular Java
 
Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
GlassFish Community and future larochelle
GlassFish Community and future larochelleGlassFish Community and future larochelle
GlassFish Community and future larochelle
 
GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010
 

Similar to OSGi and Java EE in GlassFish - Tech Days 2010 India

OSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFishOSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFishArun Gupta
 
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 For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...IndicThreads
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - GlassFishglassfish
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBayTony Ng
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMmukulobject
 
Introducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management PlatformIntroducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management PlatformNuxeo
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010JUG Lausanne
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPIlan Salviano
 
Eclipse Apricot
Eclipse ApricotEclipse Apricot
Eclipse ApricotNuxeo
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC MetropjhInovex
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1pjhInovex
 
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...Nuxeo
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesJan S. Rellermeyer
 
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
 

Similar to OSGi and Java EE in GlassFish - Tech Days 2010 India (20)

OSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFishOSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFish
 
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 For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
 
OTN Developer Days - GlassFish
OTN Developer Days - GlassFishOTN Developer Days - GlassFish
OTN Developer Days - GlassFish
 
Polyglot OSGi
Polyglot OSGiPolyglot OSGi
Polyglot OSGi
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBay
 
Hybrid Applications
Hybrid ApplicationsHybrid Applications
Hybrid Applications
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDM
 
Introducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management PlatformIntroducing Apricot, The Eclipse Content Management Platform
Introducing Apricot, The Eclipse Content Management Platform
 
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
Java EE 6 & GlassFish V3 - Alexis Moussine-Pouchkine - May 2010
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SP
 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
 
OSGi
OSGiOSGi
OSGi
 
Eclipse Apricot
Eclipse ApricotEclipse Apricot
Eclipse Apricot
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC Metro
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1
 
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
 
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
 

More from Arun Gupta

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdfArun Gupta
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Arun Gupta
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesArun Gupta
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerArun Gupta
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Arun Gupta
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open SourceArun Gupta
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using KubernetesArun Gupta
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native ApplicationsArun Gupta
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with KubernetesArun Gupta
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMArun Gupta
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Arun Gupta
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteArun Gupta
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Arun Gupta
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitArun Gupta
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeArun Gupta
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017Arun Gupta
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftArun Gupta
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersArun Gupta
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!Arun Gupta
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersArun Gupta
 

More from Arun Gupta (20)

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open Source
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using Kubernetes
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native Applications
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with Kubernetes
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAM
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's Landscape
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 

Recently uploaded

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

OSGi and Java EE in GlassFish - Tech Days 2010 India

  • 1. <Insert Picture Here> OSGi & Java EE in GlassFish Arun Gupta, Java EE & GlassFish Guy blogs.sun.com/arungupta, @arungupta
  • 2. The following/preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Are you tweeting ? #glassfish #techdays 3
  • 4. The OSGi Alliance is a worldwide consortium of technology innovators that advances a proven and mature process to assure interoperability of applications and services based on its component integration platform. 4
  • 5. OSGi Alliance provides ... • Specifications • Reference Implementation • Test Suites • Certifications 5
  • 6. What is OSGi ? • Specification delivered by OSGi Alliance • Originally for embedded devices and networks • Architecture for modular application development in Java • Reduces the cost of building, maintaining, and deploying applications 6
  • 7. What is OSGi ? • OSGi “container” breaks application into “modules” or “bundles” • Felix, Equinox, Knopflerfish • Dependencies between each bundle are managed • Can install, uninstall, start, and stop each bundle dynamically without restarting container • Multiple versions of a bundle are supported 7
  • 8. GlassFish v3 & OSGi • No OSGi APIs are used in GlassFish • HK2 provides abstraction layer • All GlassFish modules are OSGi bundles • Felix is default, also runs on Knopflerfish & Equinox • Can run in an existing shell • 216 modules in v3 http://blogs.sun.com/arungupta/entry/totd_103_glassfish_v3_with 8
  • 9. Benefits of OSGi for GlassFish • Demands and enforces stronger modularity • Enables custom tailored App server • Lazy loading based on usage patterns • Open for all JVM based technologies • Native deployment of JRuby-on-Rails application • Successfully maintained quick startup • Available to GlassFish developers and users 9
  • 10. GlassFish: The next generation platform REST OpenMQ WebSpace Server Scripting OpenESB OpenSSO Web Services JMS Portal Web Connection Java Web Services JSF EJB Container Application Container Container Pooling (JCA) Persistence Interop Management Console Update Center Management CLI Naming Grizzly Framework Monitoring/ Injection Service Config Deploy Manager Security Monitor Configuration Cluster Serviceability/ Logging GlassFish V3 Core Transaction Security (Module Subsystem) Service Service Deployment Clustering OSGi Java SE 10
  • 11. GlassFish v3 Runtime with OSGi GlassFish V3 modules GlassFish V3 modules Random OSGi Bundle Random OSGi Bundle (OSGi + extra metadata) (OSGi + extra metadata) Service OSGi OSGi HK2 Service layer HK2 Service layer Mapper Service Layer Service Layer OSGi Bundle management OSGi Bundle management 11
  • 12. Create an OSGi Bundle – Using Maven • Create a Maven project • Implement “BundleActivator” • Update “pom.xml” • Change packaging to “bundle” • Add dependencies on OSGI APIs • Use “maven-bundle-plugin” to package • Build the bundle http://blogs.sun.com/arungupta/entry/totd_36_deploy_osgi_bundles 12
  • 13. OSGi Bundle Management in GlassFish • asadmin deploy –type osgi • “cp” / “rm” glassfish/modules/autostart directory • telnet localhost 6666 • Apache Felix Web Console • REST Console bundle • Perl-based shell (Osgish) http://blogs.sun.com/arungupta/entry/totd_118_managing_osgi_bundles 13
  • 14. 14
  • 15. Why OSGi in Enterprise Apps ? • Improved modularity • Reusable bundles • Dependencies are more visible • Better isolation / Cleaner class loading model • Better version control • Faster deployment cycle • Better tools for deployment • Observable bundle life cycle • Service Tracking • Criteria-based service selection 15
  • 16. Why Java EE in Enterprise Apps ? • Better API (JPA, JTA, JAXB, JNDI) • Better component model (Servlet, EJB, JAX-RS) • Better frameworks (JSF, CDI) • Ease-of-use (Annotations, Convention-over-configuration) • Platform provided integrated infrastructure services • Transaction, Security, Persistence, Remoting, ... • Many more reasons ... 16
  • 17. Hybrid Applications “A hybrid application is an OSGi bundle as well as a Java EE archive and hence has both an OSGi bundle context and Java EE c ontext at runtime and can leverage capabilities of both the platforms.” 17
  • 18. Why Hybrid Apps ? Best of both worlds!!! Why do you want to learn new APIs ? 18
  • 19. Role of GlassFish • Provides a runtime for Hybrid Applications • Implements Java EE related OSGi services and standards • Don't have to assemble the bits • OSGi is no longer under the cover • Raises visibility from GlassFish developers to users 19
  • 20. Enterprise OSGi API in GlassFish • OSGi/HTTP Service • OSGi/Web Application (rfc #66) • OSGi/EJB • OSGi/JDBC (rfc #122) • OSGi/JPA • OSGi/JTA (rfc #98) Work in Progress (in trunk), some of it already in v3. 20
  • 21. OSGi/Web Application (rfc #66) • Web Application Bundle (WAB) • WAR + OSGi + Web-ContextPath Header • Can use all enterprise APIs include JPA with lazy loading • Sample manifest: Manifest-Version: 1.0 Import-Package: javax.servlet.http; javax.persistence Bundle-ClassPath: WEB-INF/classes/,WEB-INF/lib/entities.jar Bundle-Version: 1.0 Bundle-ManifestVersion: 2 Web-ContextPath: /hello Bundle-SymbolicName: test.hellowab • Wrapped WAR Support • webbundle: URL scheme 21
  • 22. Hybrid Applications - Demo • OSGi services in Java EE @Resource(mappedName=”osgiName”) SomeOSGiService osgiService; • JNDI Lookup • Portable, no OSGi dependencies in application • Exported APIs visible to Java EE apps http://blogs.sun.com/arungupta/entry/totd_124_osgi_declarative_services 22
  • 23. Extending GlassFish v3 Using Spring dm Container • Simple Spring bean implementing the service • Invoke the service from a servlet using standard @Resource injection • Single runtime for both Spring and full Java EE http://blogs.sun.com/dochez/entry/glassfish_v3_extensions_part_4 23
  • 24. Create an OSGi bundle - NetBeans 24
  • 25. Looking Forward • GlassFish v3 • Support OSGi-Enabled Java EE applications • Implement Java EE-related OSGi services • Expose Java EE services as OSGi services • Improve underlying OSGi framework administration 25
  • 26. References • glassfish.org • blogs.sun.com/theaquarium • twitter.com/glassfish • glassfish@sun.com 26
  • 27. <Insert Picture Here> OSGi & Java EE in GlassFish Arun Gupta, Java EE & GlassFish Guy blogs.sun.com/arungupta, @arungupta