SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
Enterprise Applications with OSGi
           and SpringSource dm Server

                                  Eberhard Wolff – SpringSource
                                    Sam Brannen – OpenCredo

                          Jazoon – 24 June 2009 – Zürich, Switzerland




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
Eberhard.Wolff (@) SpringSource.com
   • Regional Director of German speaking
     countries and Principal Consultant
   • Author of several articles and books
   • First German book on Spring
   • Speaker at national and international
     conferences
   • Blog: http://jandiandme.blogspot.com/




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   2
SpringSource
   • Employs most committers for Spring
   • Committers for Tomcat, ActiveMQ, Apache
     HTTP
   • New: tc Server / dm Server
   • Groovy / Grails
   • Hyperic

   • Training
   • Consulting
   • Subscription / Support
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   3
Sam.Brannen (@) OpenCredo.com
   • Software Consultant
   • Spring Framework Core Developer
   • Previous SpringSource dm Server developer:
     OSGi-enabled Web deployment models,
     Tomcat integration, Test Framework
   • Java developer with 10+ years' experience
   • Regular speaker at conferences on Spring, dm
     Server, Java, and testing
   • Co-author of Spring in a Nutshell; chief
     technical reviewer for Spring Recipes


Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   4
Open Credo
   • Experts in Open Source application
     development
   • Consulting
   • Coaching
   • Management Training
   • Committers for numerous Spring projects
             – Spring Framework
             – Spring Integration
             – Spring .NET



Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   5
Why another Application Server?




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
OSGi’s Promise of Modularity
   • Modularization is key to maintainable
     software
   • Application Server itself is modularized
             – No more "one size fits all"
             – Java EE 6 introduces profiles
   • On the client and in the embedded world
     OSGi has succeeded as a standard for
     modularization
   • OSGi enters the enterprise server market…


Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   7
Building on OSGi
   • Almost all app server vendors base their
     systems on OSGi (JBoss, Sun, Oracle, IBM)
   • But none offers OSGi as a programming
     model for the customer

   • Why shouldn't the customer be as
     empowered as the app server vendor?
   • Enter SpringSource dm Server…



Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   8
OSGi




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
It's a module system
   • Partition a system into a number of modules –
     "bundles"

   • Dynamic: bundles can be installed, started,
     stopped, uninstalled and updated
             – ...at runtime
   • better operations

   • Strict visibility rules
   • Resolution process satisfies dependencies of a
     module
   • Understands versioning

Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   10
It's even service-oriented
   • Bundles can publish services…
     dynamically!

   • Service Registry allows other bundles to
     consume services

   • Services come and go at runtime
             – … transparently when using Spring-DM




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   11
OSGi Bundle
   • The fundamental unit of deployment and
     modularity in OSGi
   • Just a JAR file
             – with additional entries in META-INF/MANIFEST.MF
   • Common manifest headers:
             –     Bundle-SymbolicName
             –     Bundle-Version
             –     Bundle-Name
             –     Bundle-ManifestVersion
             –     Bundle-Vendor




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   12
Export & Import Packages
   Declare package-level visibility and
   dependencies of your bundle.

   Export-Package: com.xyz.bar
   Export-Package: com.xyz.bar;version="1.0.5"
   Import-Package: com.xyz.foo
   Import-Package:                  >= 1.0.3; e.g.,
     com.xyz.foo;version="1.0.3"    1.0.3, 1.0.3.GA,
   Import-Package:                  1.0.4, 2.0, etc.

     com.xyz.foo;version="[1.0.3,1.0.3]"
   Import-Package:
     com.xyz.foo;version="[1.0.3,1.1.0)",
     com.xyz.bar;version="[1.0.3,2.0.0)"
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   13
Publish a Service

              ServiceRegistration reg =
                bundleContext.registerService(
                 Bar.class.getName(),
               myBarService);
              ...
              reg.unregister();




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   14
Consume a Service
   ServiceReference ref =
     bundleContext.getServiceReference(
      Bar.class.getName());
     Bar bar = (Bar)
       bundleContext.getService(ref);
     ...
     bundleContext.ungetService(ref);
     // bar should no longer be used here

                     Complex… Potential resource leaks!
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   15
OSGi in the Enterprise




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
OSGi as a Server Platform

                                   Web
                                 Application

                                                Enterprise Server Bundles

                                    Web                            Transaction                              ...                            OSGi
                                  Container                        Management                                                            Application




                                                                                 Features might be
                                                                                 added on demand



                                                                       OSGi Service Platform




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.                 17
OSGi for Enterprise Applications
   • Dynamic services are hard to develop
     (boiler plate code)
   • Basic infrastructure for OSGi + Web has to
     be done by yourself
   • What do we do about WARs?
   • How do you keep a service or type from
     leaking out of an application?
             – The notion of an application does not exist in
               OSGi…
   • Many enterprise libraries are not suited for
     OSGi
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   18
Enterprise Libraries under OSGi
   • Class and resource loading problems
             – class visibility
             – context class loader is undefined in OSGi
             – resources in META-INF
             –…


   • Not directly supported: libraries with
     multiple bundles




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   19
Example: Class Visibility


                                                                            Data Layer
                                                                             Data Layer
                                                                              Bundle
                                                                               Bundle

                 Import-Package                                                                                         Import-Package


                                      Domain Model
                                       Domain Model                                                           Hibernate
                                                                                                               Hibernate
                                         Bundle
                                          Bundle                                                               Bundle
                                                                                                                Bundle
                                      <Export-Pkg>
                                       <Export-Pkg>                                                         <Export-Pkg>
                                                                                                             <Export-Pkg>
  Domain
  types &                                                                                                                                SessionFactory
  mapping
  files

Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.               20
Good News for OSGi in the Enterprise
   • Spring 2.5 and many other Spring projects
     are OSGi-ready
             – modules shipped as bundles
             – all class loading behaves correctly under OSGi


   • Hundreds of other enterprise libraries are
     now also packaged for use under OSGi in
     the SpringSource Enterprise Bundle
     Repository



Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   21
Spring Dynamic Modules &
                  SpringSource dm Server




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
Spring-DM: ApplicationContext
   • Configuration files in /META-INF/spring
   • Automatically merged
   • ..and an ApplicationContext is created
      – one per Bundle


   • Spring-DM manages the
     ApplicationContext lifecycle
   • OSGi manages the Bundle lifecycle



Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   23
Spring-DM: Service Registry (1/2)
                           Contrast with
  <beans ...>            programmatic API
    <osgi:service ref="customerDAO"
      interface="dao.ICustomerDAO" />
    <osgi:reference id="dataSource"
      interface="javax.sql.DataSource" />
  </beans>

  Also supports filters, listeners, collections (lists
  and sets), etc.

Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   24
Spring-DM: Service Registry (2/2)
   • Dynamic services handled automatically
             – Instances and collections are proxied
             – Method calls are buffered
             – Configurable timeouts
   • Purely declarative




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   25
Out-of-scope for Spring-DM
   •      Easy import of bundles and libraries
   •      Using JPA or Hibernate in OSGi
   •      Seamless Web support
   •      Notion of an application



   • Enter SpringSource dm Server…




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   26
dm Server Platform
• Built on Equinox
• Modular architecture
   –Subsystems
   –Bundles
• Small footprint
• Modular profiles
• Bundle repository
• Library provisioning
• Serviceability
   –FFDC
   –Logging
   –Tracing



 Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   27
Importing & Exporting Types
   • Plain OSGi + …
   • Import-Library and Import-Bundle
             – Library imports bundle imports
             – Bundle imports  package imports
             – OSGi runtime semantics remain the same

   Import-Library:
          org.springframework.spring;
          version="[2.5.6,3.0)"
   Import-Bundle:
          com.springsource.org.hibernate;
          version="[3.2.6.ga,3.2.6.ga]"
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   28
Example Application Bundles
   • Web
                                                                                                                  Export                  Web
   • Service
   • API                                                                                                         Import
             – Only interfaces and                                                                                                        API
               domain classes
             – Implementation can
               be exchanged                                                                                                              Service

   • Could add
     infrastructure: data
     source, transaction
     manager, etc.
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.             29
Bundles & Types
   • Only dependencies on the API
             – Implementation can be exchanged, …
               even at runtime
   • No direct dependencies on any
     implementation
   • Not shown: dependencies on external
     bundles
   • … can be installed in dm Server
   • … modular middleware!


Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   30
Bundles & Services
                                                                                                                                         Service
    Type:                                                                Web                                                             Registry
    Import                                                                                                               consume



    Services:                                                API
    Publish /
    Consume                                                                                                                publish
                                                                       Service




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.              31
Bundles & Services
   • Infrastructure can use the same principle as
     application services
             – DataSource and PlatformTransactionManager
               are just services


   Can I still run on plain Java EE?
   • Yes: instead of OSGi Service directly inject
     Spring Beans
   • No more dynamic services / modularization
   • No code change needed
   • Application can run on Java EE or OSGi

Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   32
PAR
• Packaging format for all
  modules in an app.

• JAR with Application-*
  manifest headers

• Single unit: deploy,
  refresh, undeploy

• Application boundaries
      – Scoping of types / services
      – DataSource does not leak
        out of the application
      – Hibernate can change
        domain objects

 Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   33
Web Migration:
                                           From WAR to PAR




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
Web Application Deployment Options
• Standard Java EE WAR
      – supported as is
      – converted into an OSGi
        bundle
• Shared Libraries WAR
      – WAR + OSGi package
        imports
      – Eradicate library bloat of
        monolithic Java EE
        WARs
• Shared Services WAR
      – Uses OSGi services with
        Spring's <osgi:reference>
• Web Module
 Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   35
Web Module
   • Deployment & packaging option for OSGi-
     compliant web applications: stand-alone or
     within a PAR

   • OSGi bundle: structure similar to Shared
     Services WAR + MODULE-INF for resources

   • Reduced configuration for Spring MVC
     applications via Web manifest headers
             – Auto-configuration of Spring MVC's
               DispatcherServlet
             – Single WebApplicationContext and no Root WAC

   • Additional configuration via web.xml fragments

Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   36
Web Manifest Headers
   Manifest-Version: 1.0
   Bundle-ManifestVersion: 2
   ...
   Module-Type: Web
   Web-ContextPath: /my-web-app
   Web-DispatcherServletUrlPatterns: *.do




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   37
DEMO

          Web Module




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   38
Roadmap




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
dm Server 2.0 Roadmap
   • SpringSource dm Server 2.0: 3rd quarter 2009
   • Cloning bundles
             – Solves problems around static variables and more
   • Shared Repository
             – Share a single repository among several servers
   • Plan Files
             – Define an application as a collection of bundles
             – Does not contain the bundles, more flexible
   • Distributed and improved management
             – Operation on a group of servers
             – Like tc Server for Tomcat
   • Modular Web Applications
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   40
Support for Enterprise OSGi Standards
   • RFC 66: Web Container for OSGi (RI based
     on dm Server)
   • RFC 119: Distributed OSGi
   • RFC 124: Blueprint Service (RI based on
     Spring-DM)
   • RFC 139: JMX interface for OSGi
   • RFC 142: JNDI and OSGi integration




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   41
Summary




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
Summary: SpringSource dm Server
   • Based on proven, established
     modularization technology (OSGi)
   • Based on proven, established Web
     technology (Tomcat)
   • Spring and Spring-DM programming
     models: easy to use
   • Solves OSGi problems (e.g., context
     class loading)
   • Dynamic updates of running modules
   • Lightweight

Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   43
Summary: Deployment Options
   • OSGi bundles
   • PAR = logical & physical application
     boundary
   • dm Server supports multiple Web
     deployment formats and therefore
     migration
             – Java EE WAR → Shared Libraries WAR →
               Shared Services WAR → Web Module




Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   44
Resources
• OSGi:
      http://osgi.org
• Spring Framework:
      http://springframework.org
• Spring-DM:
      http://springframework.org/osgi
• SpringSource dm Server:
      http://springframework.org/dmserver
• SpringSource Team Blog:
      http://blog.springsource.com
• German Getting Started:
      http://www.dpunkt.de/buecher/3231.html
• OpenCredo:
      http://opencredo.com
Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.   45
Questions?


Eberhard Wolff                                                                                        Sam Brannen
eberhard.wolff@springsource.com                                                                       sam.brannen@opencredo.com

http://SpringSource.com                                                                               http://OpenCredo.com




 Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.

Contenu connexe

Similaire à Enterprise Applications With OSGi and SpringSource dm Server

Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Carsten Ziegeler
 
Building Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C ZiegelerBuilding Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C Ziegelermfrancis
 
Server Day 2009: Spring dm Server by Alef Arendsen
Server Day 2009: Spring dm Server by Alef ArendsenServer Day 2009: Spring dm Server by Alef Arendsen
Server Day 2009: Spring dm Server by Alef ArendsenJUG Genova
 
OSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application BundlesOSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application BundlesRob Davies
 
Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0
Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0
Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0sieverssj
 
Operations and Monitoring with Spring
Operations and Monitoring with SpringOperations and Monitoring with Spring
Operations and Monitoring with SpringEberhard Wolff
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewGet the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewForgeRock
 
The OSGi Framework Multiplication
The OSGi Framework MultiplicationThe OSGi Framework Multiplication
The OSGi Framework MultiplicationClément Escoffier
 
The forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for youThe forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for youRogue Wave Software
 
Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13BIWUG
 
Cloud Transition Patterns for Media Enterprises
Cloud Transition Patterns for Media EnterprisesCloud Transition Patterns for Media Enterprises
Cloud Transition Patterns for Media EnterprisesETCenter
 
Integrating Postgres with ActiveMQ and Camel
Integrating Postgres with ActiveMQ and CamelIntegrating Postgres with ActiveMQ and Camel
Integrating Postgres with ActiveMQ and CamelJustin Reock
 
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, ConsultantSpring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultantmfrancis
 
Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
Modularity, Microservices and Containerisation - Neil Bartlett, Derek BaumModularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baummfrancis
 
Node.js Deeper Dive
Node.js Deeper DiveNode.js Deeper Dive
Node.js Deeper DiveJustin Reock
 
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...Amazon Web Services
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiangmfrancis
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfAmazon Web Services
 
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...Amazon Web Services
 

Similaire à Enterprise Applications With OSGi and SpringSource dm Server (20)

Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)
 
Building Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C ZiegelerBuilding Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C Ziegeler
 
Server Day 2009: Spring dm Server by Alef Arendsen
Server Day 2009: Spring dm Server by Alef ArendsenServer Day 2009: Spring dm Server by Alef Arendsen
Server Day 2009: Spring dm Server by Alef Arendsen
 
OSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application BundlesOSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application Bundles
 
Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0
Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0
Show110 - Make your business Open and Social using IBM Notes Social Edition 9.0
 
Operations and Monitoring with Spring
Operations and Monitoring with SpringOperations and Monitoring with Spring
Operations and Monitoring with Spring
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewGet the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - Overview
 
The OSGi Framework Multiplication
The OSGi Framework MultiplicationThe OSGi Framework Multiplication
The OSGi Framework Multiplication
 
The forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for youThe forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for you
 
Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13
 
Cloud Transition Patterns for Media Enterprises
Cloud Transition Patterns for Media EnterprisesCloud Transition Patterns for Media Enterprises
Cloud Transition Patterns for Media Enterprises
 
Integrating Postgres with ActiveMQ and Camel
Integrating Postgres with ActiveMQ and CamelIntegrating Postgres with ActiveMQ and Camel
Integrating Postgres with ActiveMQ and Camel
 
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, ConsultantSpring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
 
Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
Modularity, Microservices and Containerisation - Neil Bartlett, Derek BaumModularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
 
Node.js Deeper Dive
Node.js Deeper DiveNode.js Deeper Dive
Node.js Deeper Dive
 
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
Why Users Are Moving on from Docker and Leaving Its Security Risks Behind (Sp...
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiang
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...
 

Plus de Sam Brannen

Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023Sam Brannen
 
Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022Sam Brannen
 
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019Sam Brannen
 
JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019Sam Brannen
 
JUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVMJUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVMSam Brannen
 
Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Sam Brannen
 
JUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyondJUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyondSam Brannen
 
Testing with Spring: An Introduction
Testing with Spring: An IntroductionTesting with Spring: An Introduction
Testing with Spring: An IntroductionSam Brannen
 
Testing with Spring 4.x
Testing with Spring 4.xTesting with Spring 4.x
Testing with Spring 4.xSam Brannen
 
Spring Framework 4.1
Spring Framework 4.1Spring Framework 4.1
Spring Framework 4.1Sam Brannen
 
Testing Spring MVC and REST Web Applications
Testing Spring MVC and REST Web ApplicationsTesting Spring MVC and REST Web Applications
Testing Spring MVC and REST Web ApplicationsSam Brannen
 
Composable Software Architecture with Spring
Composable Software Architecture with SpringComposable Software Architecture with Spring
Composable Software Architecture with SpringSam Brannen
 
Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2Sam Brannen
 
Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Sam Brannen
 
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013Sam Brannen
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSam Brannen
 
Spring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4DevelopersSpring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4DevelopersSam Brannen
 
Effective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4DevelopersEffective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4DevelopersSam Brannen
 
Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012Sam Brannen
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Sam Brannen
 

Plus de Sam Brannen (20)

Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
 
Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022
 
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
 
JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019
 
JUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVMJUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVM
 
Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2
 
JUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyondJUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyond
 
Testing with Spring: An Introduction
Testing with Spring: An IntroductionTesting with Spring: An Introduction
Testing with Spring: An Introduction
 
Testing with Spring 4.x
Testing with Spring 4.xTesting with Spring 4.x
Testing with Spring 4.x
 
Spring Framework 4.1
Spring Framework 4.1Spring Framework 4.1
Spring Framework 4.1
 
Testing Spring MVC and REST Web Applications
Testing Spring MVC and REST Web ApplicationsTesting Spring MVC and REST Web Applications
Testing Spring MVC and REST Web Applications
 
Composable Software Architecture with Spring
Composable Software Architecture with SpringComposable Software Architecture with Spring
Composable Software Architecture with Spring
 
Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2
 
Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1
 
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's New
 
Spring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4DevelopersSpring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4Developers
 
Effective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4DevelopersEffective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4Developers
 
Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
 

Enterprise Applications With OSGi and SpringSource dm Server

  • 1. Enterprise Applications with OSGi and SpringSource dm Server Eberhard Wolff – SpringSource Sam Brannen – OpenCredo Jazoon – 24 June 2009 – Zürich, Switzerland Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 2. Eberhard.Wolff (@) SpringSource.com • Regional Director of German speaking countries and Principal Consultant • Author of several articles and books • First German book on Spring • Speaker at national and international conferences • Blog: http://jandiandme.blogspot.com/ Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 2
  • 3. SpringSource • Employs most committers for Spring • Committers for Tomcat, ActiveMQ, Apache HTTP • New: tc Server / dm Server • Groovy / Grails • Hyperic • Training • Consulting • Subscription / Support Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 3
  • 4. Sam.Brannen (@) OpenCredo.com • Software Consultant • Spring Framework Core Developer • Previous SpringSource dm Server developer: OSGi-enabled Web deployment models, Tomcat integration, Test Framework • Java developer with 10+ years' experience • Regular speaker at conferences on Spring, dm Server, Java, and testing • Co-author of Spring in a Nutshell; chief technical reviewer for Spring Recipes Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 4
  • 5. Open Credo • Experts in Open Source application development • Consulting • Coaching • Management Training • Committers for numerous Spring projects – Spring Framework – Spring Integration – Spring .NET Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 5
  • 6. Why another Application Server? Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 7. OSGi’s Promise of Modularity • Modularization is key to maintainable software • Application Server itself is modularized – No more "one size fits all" – Java EE 6 introduces profiles • On the client and in the embedded world OSGi has succeeded as a standard for modularization • OSGi enters the enterprise server market… Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 7
  • 8. Building on OSGi • Almost all app server vendors base their systems on OSGi (JBoss, Sun, Oracle, IBM) • But none offers OSGi as a programming model for the customer • Why shouldn't the customer be as empowered as the app server vendor? • Enter SpringSource dm Server… Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 8
  • 9. OSGi Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 10. It's a module system • Partition a system into a number of modules – "bundles" • Dynamic: bundles can be installed, started, stopped, uninstalled and updated – ...at runtime • better operations • Strict visibility rules • Resolution process satisfies dependencies of a module • Understands versioning Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 10
  • 11. It's even service-oriented • Bundles can publish services… dynamically! • Service Registry allows other bundles to consume services • Services come and go at runtime – … transparently when using Spring-DM Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 11
  • 12. OSGi Bundle • The fundamental unit of deployment and modularity in OSGi • Just a JAR file – with additional entries in META-INF/MANIFEST.MF • Common manifest headers: – Bundle-SymbolicName – Bundle-Version – Bundle-Name – Bundle-ManifestVersion – Bundle-Vendor Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 12
  • 13. Export & Import Packages Declare package-level visibility and dependencies of your bundle. Export-Package: com.xyz.bar Export-Package: com.xyz.bar;version="1.0.5" Import-Package: com.xyz.foo Import-Package: >= 1.0.3; e.g., com.xyz.foo;version="1.0.3" 1.0.3, 1.0.3.GA, Import-Package: 1.0.4, 2.0, etc. com.xyz.foo;version="[1.0.3,1.0.3]" Import-Package: com.xyz.foo;version="[1.0.3,1.1.0)", com.xyz.bar;version="[1.0.3,2.0.0)" Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 13
  • 14. Publish a Service ServiceRegistration reg = bundleContext.registerService( Bar.class.getName(), myBarService); ... reg.unregister(); Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 14
  • 15. Consume a Service ServiceReference ref = bundleContext.getServiceReference( Bar.class.getName()); Bar bar = (Bar) bundleContext.getService(ref); ... bundleContext.ungetService(ref); // bar should no longer be used here Complex… Potential resource leaks! Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 15
  • 16. OSGi in the Enterprise Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 17. OSGi as a Server Platform Web Application Enterprise Server Bundles Web Transaction ... OSGi Container Management Application Features might be added on demand OSGi Service Platform Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 17
  • 18. OSGi for Enterprise Applications • Dynamic services are hard to develop (boiler plate code) • Basic infrastructure for OSGi + Web has to be done by yourself • What do we do about WARs? • How do you keep a service or type from leaking out of an application? – The notion of an application does not exist in OSGi… • Many enterprise libraries are not suited for OSGi Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 18
  • 19. Enterprise Libraries under OSGi • Class and resource loading problems – class visibility – context class loader is undefined in OSGi – resources in META-INF –… • Not directly supported: libraries with multiple bundles Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 19
  • 20. Example: Class Visibility Data Layer Data Layer Bundle Bundle Import-Package Import-Package Domain Model Domain Model Hibernate Hibernate Bundle Bundle Bundle Bundle <Export-Pkg> <Export-Pkg> <Export-Pkg> <Export-Pkg> Domain types & SessionFactory mapping files Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 20
  • 21. Good News for OSGi in the Enterprise • Spring 2.5 and many other Spring projects are OSGi-ready – modules shipped as bundles – all class loading behaves correctly under OSGi • Hundreds of other enterprise libraries are now also packaged for use under OSGi in the SpringSource Enterprise Bundle Repository Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 21
  • 22. Spring Dynamic Modules & SpringSource dm Server Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 23. Spring-DM: ApplicationContext • Configuration files in /META-INF/spring • Automatically merged • ..and an ApplicationContext is created – one per Bundle • Spring-DM manages the ApplicationContext lifecycle • OSGi manages the Bundle lifecycle Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 23
  • 24. Spring-DM: Service Registry (1/2) Contrast with <beans ...> programmatic API <osgi:service ref="customerDAO" interface="dao.ICustomerDAO" /> <osgi:reference id="dataSource" interface="javax.sql.DataSource" /> </beans> Also supports filters, listeners, collections (lists and sets), etc. Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 24
  • 25. Spring-DM: Service Registry (2/2) • Dynamic services handled automatically – Instances and collections are proxied – Method calls are buffered – Configurable timeouts • Purely declarative Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 25
  • 26. Out-of-scope for Spring-DM • Easy import of bundles and libraries • Using JPA or Hibernate in OSGi • Seamless Web support • Notion of an application • Enter SpringSource dm Server… Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 26
  • 27. dm Server Platform • Built on Equinox • Modular architecture –Subsystems –Bundles • Small footprint • Modular profiles • Bundle repository • Library provisioning • Serviceability –FFDC –Logging –Tracing Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 27
  • 28. Importing & Exporting Types • Plain OSGi + … • Import-Library and Import-Bundle – Library imports bundle imports – Bundle imports package imports – OSGi runtime semantics remain the same Import-Library: org.springframework.spring; version="[2.5.6,3.0)" Import-Bundle: com.springsource.org.hibernate; version="[3.2.6.ga,3.2.6.ga]" Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 28
  • 29. Example Application Bundles • Web Export Web • Service • API Import – Only interfaces and API domain classes – Implementation can be exchanged Service • Could add infrastructure: data source, transaction manager, etc. Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 29
  • 30. Bundles & Types • Only dependencies on the API – Implementation can be exchanged, … even at runtime • No direct dependencies on any implementation • Not shown: dependencies on external bundles • … can be installed in dm Server • … modular middleware! Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 30
  • 31. Bundles & Services Service Type: Web Registry Import consume Services: API Publish / Consume publish Service Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 31
  • 32. Bundles & Services • Infrastructure can use the same principle as application services – DataSource and PlatformTransactionManager are just services Can I still run on plain Java EE? • Yes: instead of OSGi Service directly inject Spring Beans • No more dynamic services / modularization • No code change needed • Application can run on Java EE or OSGi Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 32
  • 33. PAR • Packaging format for all modules in an app. • JAR with Application-* manifest headers • Single unit: deploy, refresh, undeploy • Application boundaries – Scoping of types / services – DataSource does not leak out of the application – Hibernate can change domain objects Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 33
  • 34. Web Migration: From WAR to PAR Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 35. Web Application Deployment Options • Standard Java EE WAR – supported as is – converted into an OSGi bundle • Shared Libraries WAR – WAR + OSGi package imports – Eradicate library bloat of monolithic Java EE WARs • Shared Services WAR – Uses OSGi services with Spring's <osgi:reference> • Web Module Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 35
  • 36. Web Module • Deployment & packaging option for OSGi- compliant web applications: stand-alone or within a PAR • OSGi bundle: structure similar to Shared Services WAR + MODULE-INF for resources • Reduced configuration for Spring MVC applications via Web manifest headers – Auto-configuration of Spring MVC's DispatcherServlet – Single WebApplicationContext and no Root WAC • Additional configuration via web.xml fragments Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 36
  • 37. Web Manifest Headers Manifest-Version: 1.0 Bundle-ManifestVersion: 2 ... Module-Type: Web Web-ContextPath: /my-web-app Web-DispatcherServletUrlPatterns: *.do Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 37
  • 38. DEMO Web Module Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 38
  • 39. Roadmap Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 40. dm Server 2.0 Roadmap • SpringSource dm Server 2.0: 3rd quarter 2009 • Cloning bundles – Solves problems around static variables and more • Shared Repository – Share a single repository among several servers • Plan Files – Define an application as a collection of bundles – Does not contain the bundles, more flexible • Distributed and improved management – Operation on a group of servers – Like tc Server for Tomcat • Modular Web Applications Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 40
  • 41. Support for Enterprise OSGi Standards • RFC 66: Web Container for OSGi (RI based on dm Server) • RFC 119: Distributed OSGi • RFC 124: Blueprint Service (RI based on Spring-DM) • RFC 139: JMX interface for OSGi • RFC 142: JNDI and OSGi integration Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 41
  • 42. Summary Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.
  • 43. Summary: SpringSource dm Server • Based on proven, established modularization technology (OSGi) • Based on proven, established Web technology (Tomcat) • Spring and Spring-DM programming models: easy to use • Solves OSGi problems (e.g., context class loading) • Dynamic updates of running modules • Lightweight Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 43
  • 44. Summary: Deployment Options • OSGi bundles • PAR = logical & physical application boundary • dm Server supports multiple Web deployment formats and therefore migration – Java EE WAR → Shared Libraries WAR → Shared Services WAR → Web Module Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 44
  • 45. Resources • OSGi: http://osgi.org • Spring Framework: http://springframework.org • Spring-DM: http://springframework.org/osgi • SpringSource dm Server: http://springframework.org/dmserver • SpringSource Team Blog: http://blog.springsource.com • German Getting Started: http://www.dpunkt.de/buecher/3231.html • OpenCredo: http://opencredo.com Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited. 45
  • 46. Questions? Eberhard Wolff Sam Brannen eberhard.wolff@springsource.com sam.brannen@opencredo.com http://SpringSource.com http://OpenCredo.com Copyright 2008-2009 SpringSource and Open Credo. Copying, publishing or distributing without express written permission is prohibited.