SlideShare a Scribd company logo
OSGi Service
                           Component Models
                                   Heiko Seeberger (WeigleWilczek)
                              Kai Tödter (Siemens Corporate Technology)




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   JAX 2009
OSGi Service Component Models




                                                                      Agenda

          •      Why? What?

          •      OSGi Declarative Services

          •      Spring Dynamic Modules

          •      Apache iPOJO

          •      Guice Peaberry

          •      Comparison

          •      Demo


© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   2
OSGi Service Component Models




                                                   Why Components?
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   3
OSGi Service Component Models




                                                        The OO Dream



             quot;Object Oriented technology was going to change the
           world . . . we would have all these objects in our library and
          building a new system would be a snap. Just get a few classes,
                         bunch them together . . . and voila!quot;
      Peter Kriens, http://www.aqute.biz/Blog/2006-04-29




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   4
OSGi Service Component Models




                                                         The OO Reality
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   5
OSGi Service Component Models




                                                                   Coupling!




          •      Classes can almost never be used in isolation

          •      They depend on other classes

          •      Those classes depend on other packages,
                 which depend on other JARs . . .




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   6
OSGi Service Component Models




                                     How can Components help?
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   7
OSGi Service Component Models




                                                          Components ...




          •      are self-contained and declare their dependencies

          •      declare their interface and hide their internals

          •      interact with the container and obey to a life cycle




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   8
OSGi Service Component Models




                                       OSGi enables Components



          •      OSGi Framework is the container

          •      Managed dependencies

          •      Life cycle and interactions with the container

          •      Loose coupling through service model




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   9
OSGi Service Component Models




                            Why Service Component Models?
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   10
OSGi Service Component Models




                                  Why not use plain OSGi APIs?


          •      We want to avoid OSGi glue code
                •      POJOs enhance testability

                •      Repetitive glue code reduces productivity

          •      Service Component Models ease service handling
                •      OSGi APIs lead to involved code

                •      SCMs offer advanced features




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   11
OSGi Service Component Models




                                                                      Agenda

          •      Why? What?

          •      OSGi Declarative Services

          •      Spring Dynamic Modules

          •      Apache iPOJO

          •      Guice Peaberry

          •      Comparison

          •      Demo


© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   12
OSGi Service Component Models




                                                                    OSGi Framework
                        Active Bundle                                                                                Active Bundle

                         Component                                                                                     Component
                                                                            Service
                         Component                                                                                     Component
                                                         reference
                          Instance                                                                                     Description
                                                                                           provide
                         Component                                                                                     Component
                         Description                                                                                    Instance




                                        OSGi Declarative Services
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.     13
OSGi Service Component Models




                                                                                             OSGi Framework
                       DS-powered Bundle


                                                                                                    Service Component
                                                                                                          Runtime

                                   Component                                               create




                                    Service Component Runtime
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   14
OSGi Service Component Models




                                            Declaring a Component




          •      Specify component description(s) via
                 Service-Component manifest header
                                                Service-Component: OSGI-INF/treeView.xml



          •      Specify the implementation class
                                  <component xmlns=quot;http://www.osgi.org/xmlns/scr/v1.1.0quot;>
                                      <implementation class=quot;...TreeViewquot;/>
                                  </component>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   15
OSGi Service Component Models




                                                    Providing a Service




          •      Specify each service interface

          •      By default components providing a service are delayed
                                         <service>
                                             <provide interface=quot;...IViewContributionquot;/>
                                             <provide interface=quot;...IPersonListenerquot;/>
                                         </service>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   16
OSGi Service Component Models




                                                 Referencing Services




          •      Specify the service interface

          •      Specify bind and unbind methods

          •      Specify the cardinality
                                               <reference interface=quot;...IPersonManagerquot;
                                                          bind=quot;setPersonManagerquot;
                                                          unbind=quot;removePersonManagerquot;
                                                          cardinality=quot;1..1quot;/>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   17
OSGi Service Component Models




               Concurrency for static and dynamic Policy




          •      No concurrency issues for static policy
                •      On (un)binding of references the component is deactivated and activated again

          •      Pay attention to concurrency for dynamic policy
                •      The component must be thread-safe regarding references

                                                        <reference ...
                                                                   policy=quot;dynamicquot;/>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   18
OSGi Service Component Models




                                                                      Agenda

          •      Why? What?

          •      OSGi Declarative Services

          •      Spring Dynamic Modules

          •      Apache iPOJO

          •      Guice Peaberry

          •      Comparison

          •      Demo


© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   19
OSGi Service Component Models




                                                                    OSGi Framework
                           Active Bundle                                                                          Active Bundle

                      Application Context                                                                    Application Context
                                                                               Service

                                     Bean                       import                                                             Bean

                                                                                        export
                                           Bean
                                                                                                                      Bean
                         Bean




                                           Spring Dynamic Modules
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.          20
OSGi Service Component Models




                                                                                             OSGi Framework
                    Spring-powered Bundle


                                                                                                    Spring DM Extender


                       Application Context                                                  create




                                                  Spring DM Extender
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   21
OSGi Service Component Models




                   Declaring a Bundle Application Context




          •      By default configurations are looked up under
                 META-INF/spring/

          •      Multiple configurations are merged into a
                 single Application Context




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   22
OSGi Service Component Models




                                                    Providing a Service




          •      Specify each service interface or use auto-export

          •      Beans exported as service cannot be lazy
                                              <osgi:service ref=quot;treeViewquot;
                                                            auto-export=quot;interfacesquot; />




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   23
OSGi Service Component Models




                                                 Referencing Services




          •      A local bean is created with given ID

          •      Specify the service interface

          •      Specify the cardinality
                                          <osgi:reference id=quot;personManagerOSGiquot;
                                                          interface=quot;...IPersonManagerquot;
                                                          cardinality=quot;1..1quot;>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   24
OSGi Service Component Models




                                       Concurrency in Spring DM



          •      References are only injected once
                •      Proxies for unary references

                •      Managed collections for multiple references with “Iterator guarantee”

          •      Concurrency issue is swapped for uncertainty
                •      ServiceUnavilableException




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   25
OSGi Service Component Models




                                                                      Agenda

          •      Why? What?

          •      OSGi Declarative Services

          •      Spring Dynamic Modules

          •      Apache iPOJO

          •      Guice Peaberry

          •      Comparison

          •      Demo


© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   26
OSGi Service Component Models




                                                                    OSGi Framework
                        Active Bundle                                                                                Active Bundle

                         Component                                                                                     Component
                                                                            Service
                         Component                                                                                     Component
                                                         reference
                          Instance                                                                                      Metadata
                                                                                           provide
                         Component                                                                                     Component
                          Metadata                                                                                      Instance




                                                           Apache iPOJO
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.     27
OSGi Service Component Models




                                            Declaring a Component




          •      Component metadata will be used to
                 instrument the bytecode at build-time

          •      Specify component and instance
                                              <ipojo>
                                                  <component classname=quot;...TreeViewquot; />
                                                  <instance component=quot;...TreeViewquot; />
                                              </ipojo>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   28
OSGi Service Component Models




                                                    Providing a Service




          •      Service interfaces are computed by iPOJO

          •      iPOJO services are created lazily
                                                                    <component ...>
                                                                        <provides />
                                                                    </component>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   29
OSGi Service Component Models




                                                 Referencing Services




          •      iPOJO offers field and method injection
                              <requires field=quot;logServicequot; />
                              <requires>
                                  <callback type=quot;bindquot; method=quot;setPersonManagerquot; />
                                  <callback type=quot;unbindquot; method=quot;removePersonManagerquot; />
                              </requires>




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   30
OSGi Service Component Models




                                              Concurrency in iPOJO




          •      iPOJO manages concurrency for references
                •      We can write our code without regard for thread-safety

                •      Bytecode instrumentation weaves in all necessary synchronization




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   31
OSGi Service Component Models




                                                                      Agenda

          •      Why? What?

          •      OSGi Declarative Services

          •      Spring Dynamic Modules

          •      Apache iPOJO

          •      Guice Peaberry

          •      Comparison

          •      Demo


© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   32
OSGi Service Component Models




                                                              Comparison


                                                                                            DS                      DM             iPOJO
                                                                                             +                         +            +
       POJO-ness
                                                                                              o                        +            o
       DI power
                                                                                              o                        o            +
       Ease of programming model
                                                                                             +                         +             -
       Ease of build
                                                                                             +                         -            +
       Size and dependencies
                                                                                             +                         -            +
       Support for laziness


© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.           33
OSGi Service Component Models




                                                                      Agenda

          •      Why? What?

          •      OSGi Declarative Services

          •      Spring Dynamic Modules

          •      Apache iPOJO

          •      Guice Peaberry

          •      Comparison

          •      Demo


© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   34
OSGi Service Component Models




                                     Dynamic Swing OSGi Demo
© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   35
OSGi Service Component Models




                                             How to get the Demo?

          •      http://max-server.myftp.org/trac/pm
                •      Wiki with some documentation

                •      Anonymous Subversion access

                •      Trac issue tracking


          •      Licenses
                •      All PM project sources are licensed under EPL

                •      Swing Application Framework (JSR 296) implementation is licensed under LGPL

                •      Swing Worker is licensed under LGPL

                •      The nice icons from FamFamFam are licensed under the Creative Commons
                       Attribution 2.5 License.



© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   36
Thank you!
               Slides at www.slideshare.net/heiko.seeberger/jax-09-osgi-service-components-models
                                      Demo at max-server.myftp.org/trac/pm




© 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.   JAX 2009

More Related Content

Similar to JAX 09 - OSGi Service Components Models

Enterprise Osgi
Enterprise OsgiEnterprise Osgi
Enterprise Osgi
parag978978
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
njbartlett
 
Equinox -The adoption of the OSGi standard in enterprise solutions
Equinox -The adoption of the OSGi standard in enterprise solutions Equinox -The adoption of the OSGi standard in enterprise solutions
Equinox -The adoption of the OSGi standard in enterprise solutions
SpagoWorld
 
Adopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy ContextAdopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy Context
Xavier Warzee
 
OSGi Mars World in Action
OSGi Mars World in ActionOSGi Mars World in Action
OSGi Mars World in Action
Christian Baranowski
 
Smila ESE 2008
Smila ESE 2008Smila ESE 2008
Smila ESE 2008
novakovic
 
OSGi
OSGiOSGi
Moduarlity patterns with OSGi
Moduarlity patterns with OSGiModuarlity patterns with OSGi
Moduarlity patterns with OSGi
Paul Bakker
 
USolutions - SOA and the Cloud
USolutions - SOA and the CloudUSolutions - SOA and the Cloud
USolutions - SOA and the Cloud
usolutions
 
Eclipse Con2010 Composites
Eclipse Con2010 CompositesEclipse Con2010 Composites
Eclipse Con2010 Composites
tjwats
 
GeneXus en Mitsubishi Heavy Industries (MHI) – Japón
GeneXus en Mitsubishi Heavy Industries (MHI) – JapónGeneXus en Mitsubishi Heavy Industries (MHI) – Japón
GeneXus en Mitsubishi Heavy Industries (MHI) – Japón
GeneXus
 
EclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big ModelsEclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big Models
Christof Hammel
 
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
W-JAX 08 - Declarative Services versus Spring Dynamic ModulesW-JAX 08 - Declarative Services versus Spring Dynamic Modules
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
Heiko Seeberger
 
Extending SSRS Whitepaper
Extending SSRS WhitepaperExtending SSRS Whitepaper
Extending SSRS Whitepaper
Robert Peters
 
Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...
mfrancis
 
Whats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ HargraveWhats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ Hargrave
mfrancis
 
20090410 J Spring Pragmatic Model Driven Development In Java Using Smart
20090410   J Spring Pragmatic Model Driven Development In Java Using Smart20090410   J Spring Pragmatic Model Driven Development In Java Using Smart
20090410 J Spring Pragmatic Model Driven Development In Java Using Smart
Sander Hoogendoorn
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
Paul Fiore
 
Five Cool Use Cases for the Spring Component in Oracle SOA Suite
Five Cool Use Cases for the Spring Component in Oracle SOA SuiteFive Cool Use Cases for the Spring Component in Oracle SOA Suite
Five Cool Use Cases for the Spring Component in Oracle SOA Suite
Guido Schmutz
 
Universal Declarative Services
Universal Declarative ServicesUniversal Declarative Services
Universal Declarative Services
schemouil
 

Similar to JAX 09 - OSGi Service Components Models (20)

Enterprise Osgi
Enterprise OsgiEnterprise Osgi
Enterprise Osgi
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Equinox -The adoption of the OSGi standard in enterprise solutions
Equinox -The adoption of the OSGi standard in enterprise solutions Equinox -The adoption of the OSGi standard in enterprise solutions
Equinox -The adoption of the OSGi standard in enterprise solutions
 
Adopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy ContextAdopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy Context
 
OSGi Mars World in Action
OSGi Mars World in ActionOSGi Mars World in Action
OSGi Mars World in Action
 
Smila ESE 2008
Smila ESE 2008Smila ESE 2008
Smila ESE 2008
 
OSGi
OSGiOSGi
OSGi
 
Moduarlity patterns with OSGi
Moduarlity patterns with OSGiModuarlity patterns with OSGi
Moduarlity patterns with OSGi
 
USolutions - SOA and the Cloud
USolutions - SOA and the CloudUSolutions - SOA and the Cloud
USolutions - SOA and the Cloud
 
Eclipse Con2010 Composites
Eclipse Con2010 CompositesEclipse Con2010 Composites
Eclipse Con2010 Composites
 
GeneXus en Mitsubishi Heavy Industries (MHI) – Japón
GeneXus en Mitsubishi Heavy Industries (MHI) – JapónGeneXus en Mitsubishi Heavy Industries (MHI) – Japón
GeneXus en Mitsubishi Heavy Industries (MHI) – Japón
 
EclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big ModelsEclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big Models
 
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
W-JAX 08 - Declarative Services versus Spring Dynamic ModulesW-JAX 08 - Declarative Services versus Spring Dynamic Modules
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
 
Extending SSRS Whitepaper
Extending SSRS WhitepaperExtending SSRS Whitepaper
Extending SSRS Whitepaper
 
Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...Building a right sized, do-anything runtime using OSGi technologies: a case s...
Building a right sized, do-anything runtime using OSGi technologies: a case s...
 
Whats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ HargraveWhats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ Hargrave
 
20090410 J Spring Pragmatic Model Driven Development In Java Using Smart
20090410   J Spring Pragmatic Model Driven Development In Java Using Smart20090410   J Spring Pragmatic Model Driven Development In Java Using Smart
20090410 J Spring Pragmatic Model Driven Development In Java Using Smart
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
 
Five Cool Use Cases for the Spring Component in Oracle SOA Suite
Five Cool Use Cases for the Spring Component in Oracle SOA SuiteFive Cool Use Cases for the Spring Component in Oracle SOA Suite
Five Cool Use Cases for the Spring Component in Oracle SOA Suite
 
Universal Declarative Services
Universal Declarative ServicesUniversal Declarative Services
Universal Declarative Services
 

More from Heiko Seeberger

Scaladays 2011 - The Ease of Scalaz
Scaladays 2011 - The Ease of ScalazScaladays 2011 - The Ease of Scalaz
Scaladays 2011 - The Ease of Scalaz
Heiko Seeberger
 
RheinJUG 2010 - Sprechen Sie Scala?
RheinJUG 2010 - Sprechen Sie Scala?RheinJUG 2010 - Sprechen Sie Scala?
RheinJUG 2010 - Sprechen Sie Scala?
Heiko Seeberger
 
Objektforum 2010 - Sprechen Sie Scala?
Objektforum 2010 - Sprechen Sie Scala?Objektforum 2010 - Sprechen Sie Scala?
Objektforum 2010 - Sprechen Sie Scala?
Heiko Seeberger
 
W-JAX 09 - ScalaModules
W-JAX 09 - ScalaModulesW-JAX 09 - ScalaModules
W-JAX 09 - ScalaModules
Heiko Seeberger
 
W-JAX 09 - Lift
W-JAX 09 - LiftW-JAX 09 - Lift
W-JAX 09 - Lift
Heiko Seeberger
 
JM 08/09 - Beginning Scala Review
JM 08/09 - Beginning Scala ReviewJM 08/09 - Beginning Scala Review
JM 08/09 - Beginning Scala Review
Heiko Seeberger
 
JM 08/09 - ScalaModules
JM 08/09 - ScalaModulesJM 08/09 - ScalaModules
JM 08/09 - ScalaModules
Heiko Seeberger
 
OSGi DevCon Europe 09 - OSGi on Scala
OSGi DevCon Europe 09 - OSGi on ScalaOSGi DevCon Europe 09 - OSGi on Scala
OSGi DevCon Europe 09 - OSGi on Scala
Heiko Seeberger
 
JAX 09 - OSGi on Scala
JAX 09 - OSGi on ScalaJAX 09 - OSGi on Scala
JAX 09 - OSGi on Scala
Heiko Seeberger
 
JAX 08 - Agile RCP
JAX 08 - Agile RCPJAX 08 - Agile RCP
JAX 08 - Agile RCP
Heiko Seeberger
 
Eclipse Magazin 12 - Design by Contract
Eclipse Magazin 12 - Design by ContractEclipse Magazin 12 - Design by Contract
Eclipse Magazin 12 - Design by Contract
Heiko Seeberger
 
Eclipse Magazin 16 - Die Stärke der Drei
Eclipse Magazin 16 - Die Stärke der DreiEclipse Magazin 16 - Die Stärke der Drei
Eclipse Magazin 16 - Die Stärke der Drei
Heiko Seeberger
 
Eclipse Magazin15 - Performance Logging
Eclipse Magazin15 - Performance LoggingEclipse Magazin15 - Performance Logging
Eclipse Magazin15 - Performance Logging
Heiko Seeberger
 
Eclipse Magazin 14 - Getting hooked on Equinox
Eclipse Magazin 14 - Getting hooked on EquinoxEclipse Magazin 14 - Getting hooked on Equinox
Eclipse Magazin 14 - Getting hooked on Equinox
Heiko Seeberger
 
Eclipse Magazin 12 - Security does matter
Eclipse Magazin 12 - Security does matterEclipse Magazin 12 - Security does matter
Eclipse Magazin 12 - Security does matter
Heiko Seeberger
 

More from Heiko Seeberger (20)

Scaladays 2011 - The Ease of Scalaz
Scaladays 2011 - The Ease of ScalazScaladays 2011 - The Ease of Scalaz
Scaladays 2011 - The Ease of Scalaz
 
Java Magazin - Lift
Java Magazin - LiftJava Magazin - Lift
Java Magazin - Lift
 
JavaSPEKTRUM - Scala 3
JavaSPEKTRUM - Scala 3JavaSPEKTRUM - Scala 3
JavaSPEKTRUM - Scala 3
 
JavaSPEKTRUM - Scala 2
JavaSPEKTRUM - Scala 2JavaSPEKTRUM - Scala 2
JavaSPEKTRUM - Scala 2
 
JavaSPEKTRUM - Scala 1
JavaSPEKTRUM - Scala 1JavaSPEKTRUM - Scala 1
JavaSPEKTRUM - Scala 1
 
RheinJUG 2010 - Sprechen Sie Scala?
RheinJUG 2010 - Sprechen Sie Scala?RheinJUG 2010 - Sprechen Sie Scala?
RheinJUG 2010 - Sprechen Sie Scala?
 
Objektforum 2010 - Sprechen Sie Scala?
Objektforum 2010 - Sprechen Sie Scala?Objektforum 2010 - Sprechen Sie Scala?
Objektforum 2010 - Sprechen Sie Scala?
 
W-JAX 09 - ScalaModules
W-JAX 09 - ScalaModulesW-JAX 09 - ScalaModules
W-JAX 09 - ScalaModules
 
W-JAX 09 - Lift
W-JAX 09 - LiftW-JAX 09 - Lift
W-JAX 09 - Lift
 
JM 08/09 - Beginning Scala Review
JM 08/09 - Beginning Scala ReviewJM 08/09 - Beginning Scala Review
JM 08/09 - Beginning Scala Review
 
JM 08/09 - ScalaModules
JM 08/09 - ScalaModulesJM 08/09 - ScalaModules
JM 08/09 - ScalaModules
 
OSGi DevCon Europe 09 - OSGi on Scala
OSGi DevCon Europe 09 - OSGi on ScalaOSGi DevCon Europe 09 - OSGi on Scala
OSGi DevCon Europe 09 - OSGi on Scala
 
JAX 09 - OSGi on Scala
JAX 09 - OSGi on ScalaJAX 09 - OSGi on Scala
JAX 09 - OSGi on Scala
 
JAX 08 - Agile RCP
JAX 08 - Agile RCPJAX 08 - Agile RCP
JAX 08 - Agile RCP
 
Eclipse Magazin 12 - Design by Contract
Eclipse Magazin 12 - Design by ContractEclipse Magazin 12 - Design by Contract
Eclipse Magazin 12 - Design by Contract
 
JUGM 07 - AspectJ
JUGM 07 - AspectJJUGM 07 - AspectJ
JUGM 07 - AspectJ
 
Eclipse Magazin 16 - Die Stärke der Drei
Eclipse Magazin 16 - Die Stärke der DreiEclipse Magazin 16 - Die Stärke der Drei
Eclipse Magazin 16 - Die Stärke der Drei
 
Eclipse Magazin15 - Performance Logging
Eclipse Magazin15 - Performance LoggingEclipse Magazin15 - Performance Logging
Eclipse Magazin15 - Performance Logging
 
Eclipse Magazin 14 - Getting hooked on Equinox
Eclipse Magazin 14 - Getting hooked on EquinoxEclipse Magazin 14 - Getting hooked on Equinox
Eclipse Magazin 14 - Getting hooked on Equinox
 
Eclipse Magazin 12 - Security does matter
Eclipse Magazin 12 - Security does matterEclipse Magazin 12 - Security does matter
Eclipse Magazin 12 - Security does matter
 

Recently uploaded

Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
Toru Wonyoung Choi
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
Zilliz
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
Priyanka Aash
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
SubhamMandal40
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
Ivanti
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
SynapseIndia
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
Jimmy Lai
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
Baishakhi Ray
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
Anant Gupta
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
HackersList
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 

Recently uploaded (20)

Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
Using LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and MilvusUsing LLM Agents with Llama 3, LangGraph and Milvus
Using LLM Agents with Llama 3, LangGraph and Milvus
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
 
Semantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software DevelopmentSemantic-Aware Code Model: Elevating the Future of Software Development
Semantic-Aware Code Model: Elevating the Future of Software Development
 
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes..."Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
"Mastering Graphic Design: Essential Tips and Tricks for Beginners and Profes...
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 

JAX 09 - OSGi Service Components Models

  • 1. OSGi Service Component Models Heiko Seeberger (WeigleWilczek) Kai Tödter (Siemens Corporate Technology) © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. JAX 2009
  • 2. OSGi Service Component Models Agenda • Why? What? • OSGi Declarative Services • Spring Dynamic Modules • Apache iPOJO • Guice Peaberry • Comparison • Demo © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 2
  • 3. OSGi Service Component Models Why Components? © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 3
  • 4. OSGi Service Component Models The OO Dream quot;Object Oriented technology was going to change the world . . . we would have all these objects in our library and building a new system would be a snap. Just get a few classes, bunch them together . . . and voila!quot; Peter Kriens, http://www.aqute.biz/Blog/2006-04-29 © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 4
  • 5. OSGi Service Component Models The OO Reality © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 5
  • 6. OSGi Service Component Models Coupling! • Classes can almost never be used in isolation • They depend on other classes • Those classes depend on other packages, which depend on other JARs . . . © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 6
  • 7. OSGi Service Component Models How can Components help? © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 7
  • 8. OSGi Service Component Models Components ... • are self-contained and declare their dependencies • declare their interface and hide their internals • interact with the container and obey to a life cycle © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 8
  • 9. OSGi Service Component Models OSGi enables Components • OSGi Framework is the container • Managed dependencies • Life cycle and interactions with the container • Loose coupling through service model © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 9
  • 10. OSGi Service Component Models Why Service Component Models? © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 10
  • 11. OSGi Service Component Models Why not use plain OSGi APIs? • We want to avoid OSGi glue code • POJOs enhance testability • Repetitive glue code reduces productivity • Service Component Models ease service handling • OSGi APIs lead to involved code • SCMs offer advanced features © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 11
  • 12. OSGi Service Component Models Agenda • Why? What? • OSGi Declarative Services • Spring Dynamic Modules • Apache iPOJO • Guice Peaberry • Comparison • Demo © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 12
  • 13. OSGi Service Component Models OSGi Framework Active Bundle Active Bundle Component Component Service Component Component reference Instance Description provide Component Component Description Instance OSGi Declarative Services © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 13
  • 14. OSGi Service Component Models OSGi Framework DS-powered Bundle Service Component Runtime Component create Service Component Runtime © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 14
  • 15. OSGi Service Component Models Declaring a Component • Specify component description(s) via Service-Component manifest header Service-Component: OSGI-INF/treeView.xml • Specify the implementation class <component xmlns=quot;http://www.osgi.org/xmlns/scr/v1.1.0quot;> <implementation class=quot;...TreeViewquot;/> </component> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 15
  • 16. OSGi Service Component Models Providing a Service • Specify each service interface • By default components providing a service are delayed <service> <provide interface=quot;...IViewContributionquot;/> <provide interface=quot;...IPersonListenerquot;/> </service> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 16
  • 17. OSGi Service Component Models Referencing Services • Specify the service interface • Specify bind and unbind methods • Specify the cardinality <reference interface=quot;...IPersonManagerquot; bind=quot;setPersonManagerquot; unbind=quot;removePersonManagerquot; cardinality=quot;1..1quot;/> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 17
  • 18. OSGi Service Component Models Concurrency for static and dynamic Policy • No concurrency issues for static policy • On (un)binding of references the component is deactivated and activated again • Pay attention to concurrency for dynamic policy • The component must be thread-safe regarding references <reference ... policy=quot;dynamicquot;/> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 18
  • 19. OSGi Service Component Models Agenda • Why? What? • OSGi Declarative Services • Spring Dynamic Modules • Apache iPOJO • Guice Peaberry • Comparison • Demo © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 19
  • 20. OSGi Service Component Models OSGi Framework Active Bundle Active Bundle Application Context Application Context Service Bean import Bean export Bean Bean Bean Spring Dynamic Modules © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 20
  • 21. OSGi Service Component Models OSGi Framework Spring-powered Bundle Spring DM Extender Application Context create Spring DM Extender © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 21
  • 22. OSGi Service Component Models Declaring a Bundle Application Context • By default configurations are looked up under META-INF/spring/ • Multiple configurations are merged into a single Application Context © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 22
  • 23. OSGi Service Component Models Providing a Service • Specify each service interface or use auto-export • Beans exported as service cannot be lazy <osgi:service ref=quot;treeViewquot; auto-export=quot;interfacesquot; /> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 23
  • 24. OSGi Service Component Models Referencing Services • A local bean is created with given ID • Specify the service interface • Specify the cardinality <osgi:reference id=quot;personManagerOSGiquot; interface=quot;...IPersonManagerquot; cardinality=quot;1..1quot;> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 24
  • 25. OSGi Service Component Models Concurrency in Spring DM • References are only injected once • Proxies for unary references • Managed collections for multiple references with “Iterator guarantee” • Concurrency issue is swapped for uncertainty • ServiceUnavilableException © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 25
  • 26. OSGi Service Component Models Agenda • Why? What? • OSGi Declarative Services • Spring Dynamic Modules • Apache iPOJO • Guice Peaberry • Comparison • Demo © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 26
  • 27. OSGi Service Component Models OSGi Framework Active Bundle Active Bundle Component Component Service Component Component reference Instance Metadata provide Component Component Metadata Instance Apache iPOJO © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 27
  • 28. OSGi Service Component Models Declaring a Component • Component metadata will be used to instrument the bytecode at build-time • Specify component and instance <ipojo> <component classname=quot;...TreeViewquot; /> <instance component=quot;...TreeViewquot; /> </ipojo> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 28
  • 29. OSGi Service Component Models Providing a Service • Service interfaces are computed by iPOJO • iPOJO services are created lazily <component ...> <provides /> </component> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 29
  • 30. OSGi Service Component Models Referencing Services • iPOJO offers field and method injection <requires field=quot;logServicequot; /> <requires> <callback type=quot;bindquot; method=quot;setPersonManagerquot; /> <callback type=quot;unbindquot; method=quot;removePersonManagerquot; /> </requires> © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 30
  • 31. OSGi Service Component Models Concurrency in iPOJO • iPOJO manages concurrency for references • We can write our code without regard for thread-safety • Bytecode instrumentation weaves in all necessary synchronization © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 31
  • 32. OSGi Service Component Models Agenda • Why? What? • OSGi Declarative Services • Spring Dynamic Modules • Apache iPOJO • Guice Peaberry • Comparison • Demo © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 32
  • 33. OSGi Service Component Models Comparison DS DM iPOJO + + + POJO-ness o + o DI power o o + Ease of programming model + + - Ease of build + - + Size and dependencies + - + Support for laziness © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 33
  • 34. OSGi Service Component Models Agenda • Why? What? • OSGi Declarative Services • Spring Dynamic Modules • Apache iPOJO • Guice Peaberry • Comparison • Demo © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 34
  • 35. OSGi Service Component Models Dynamic Swing OSGi Demo © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 35
  • 36. OSGi Service Component Models How to get the Demo? • http://max-server.myftp.org/trac/pm • Wiki with some documentation • Anonymous Subversion access • Trac issue tracking • Licenses • All PM project sources are licensed under EPL • Swing Application Framework (JSR 296) implementation is licensed under LGPL • Swing Worker is licensed under LGPL • The nice icons from FamFamFam are licensed under the Creative Commons Attribution 2.5 License. © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 36
  • 37. Thank you! Slides at www.slideshare.net/heiko.seeberger/jax-09-osgi-service-components-models Demo at max-server.myftp.org/trac/pm © 2009 Seeberger, Tödter. Released under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. JAX 2009