Suche senden
Hochladen
JAX 09 - OSGi Service Components Models
•
13 gefällt mir
•
1,574 views
Heiko Seeberger
Folgen
Short talk (30 minutes) about "OSGi Service Components Models" at JAX 2009.
Weniger lesen
Mehr lesen
Technologie
Kunst & Fotos
Melden
Teilen
Melden
Teilen
1 von 37
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and Vaadin
Kai Tödter
Why is os gi dynamic.pptx
Why is os gi dynamic.pptx
christiancampo
Qualipso factory
Qualipso factory
funckychris
Building Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applications
Gunnar Wagenknecht
Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010
Gunnar Wagenknecht
OSGi tech session
OSGi tech session
Bram de Kruijff
Enterprise Applications With OSGi and SpringSource dm Server
Enterprise Applications With OSGi and SpringSource dm Server
Sam Brannen
The ultimate dependency manager shoot out - X Uiterlinden & S Mak
The ultimate dependency manager shoot out - X Uiterlinden & S Mak
mfrancis
Empfohlen
Dynamic and modular Web Applications with Equinox and Vaadin
Dynamic and modular Web Applications with Equinox and Vaadin
Kai Tödter
Why is os gi dynamic.pptx
Why is os gi dynamic.pptx
christiancampo
Qualipso factory
Qualipso factory
funckychris
Building Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applications
Gunnar Wagenknecht
Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010
Gunnar Wagenknecht
OSGi tech session
OSGi tech session
Bram de Kruijff
Enterprise Applications With OSGi and SpringSource dm Server
Enterprise Applications With OSGi and SpringSource dm Server
Sam Brannen
The ultimate dependency manager shoot out - X Uiterlinden & S Mak
The ultimate dependency manager shoot out - X Uiterlinden & S Mak
mfrancis
Enterprise Osgi
Enterprise Osgi
parag978978
OSGi 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
SpagoWorld
Adopting 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 Action
Christian Baranowski
Smila ESE 2008
Smila ESE 2008
novakovic
OSGi
OSGi
Zeeshan Bilal
Moduarlity patterns with OSGi
Moduarlity patterns with OSGi
Paul Bakker
USolutions - SOA and the Cloud
USolutions - SOA and the Cloud
usolutions
Eclipse Con2010 Composites
Eclipse Con2010 Composites
tjwats
GeneXus 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 Models
Christof Hammel
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
Heiko Seeberger
Extending 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...
mfrancis
Whats 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 Smart
Sander Hoogendoorn
Domino 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 Suite
Guido Schmutz
Universal Declarative Services
Universal Declarative Services
schemouil
Scaladays 2011 - The Ease of Scalaz
Scaladays 2011 - The Ease of Scalaz
Heiko Seeberger
Java Magazin - Lift
Java Magazin - Lift
Heiko Seeberger
Weitere ähnliche Inhalte
Ähnlich wie JAX 09 - OSGi Service Components Models
Enterprise Osgi
Enterprise Osgi
parag978978
OSGi 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
SpagoWorld
Adopting 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 Action
Christian Baranowski
Smila ESE 2008
Smila ESE 2008
novakovic
OSGi
OSGi
Zeeshan Bilal
Moduarlity patterns with OSGi
Moduarlity patterns with OSGi
Paul Bakker
USolutions - SOA and the Cloud
USolutions - SOA and the Cloud
usolutions
Eclipse Con2010 Composites
Eclipse Con2010 Composites
tjwats
GeneXus 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 Models
Christof Hammel
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
W-JAX 08 - Declarative Services versus Spring Dynamic Modules
Heiko Seeberger
Extending 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...
mfrancis
Whats 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 Smart
Sander Hoogendoorn
Domino 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 Suite
Guido Schmutz
Universal Declarative Services
Universal Declarative Services
schemouil
Ähnlich wie JAX 09 - OSGi Service Components Models
(20)
Enterprise Osgi
Enterprise Osgi
OSGi 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
Adopting Agile Tools & Methods In A Legacy Context
Adopting Agile Tools & Methods In A Legacy Context
OSGi Mars World in Action
OSGi Mars World in Action
Smila ESE 2008
Smila ESE 2008
OSGi
OSGi
Moduarlity patterns with OSGi
Moduarlity patterns with OSGi
USolutions - SOA and the Cloud
USolutions - SOA and the Cloud
Eclipse Con2010 Composites
Eclipse Con2010 Composites
GeneXus en Mitsubishi Heavy Industries (MHI) – Japón
GeneXus en Mitsubishi Heavy Industries (MHI) – Japón
EclipseCon 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 Modules
Extending 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...
Whats 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 Smart
Domino 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 Suite
Universal Declarative Services
Universal Declarative Services
Mehr von Heiko Seeberger
Scaladays 2011 - The Ease of Scalaz
Scaladays 2011 - The Ease of Scalaz
Heiko Seeberger
Java Magazin - Lift
Java Magazin - Lift
Heiko Seeberger
JavaSPEKTRUM - Scala 3
JavaSPEKTRUM - Scala 3
Heiko Seeberger
JavaSPEKTRUM - Scala 2
JavaSPEKTRUM - Scala 2
Heiko Seeberger
JavaSPEKTRUM - Scala 1
JavaSPEKTRUM - Scala 1
Heiko Seeberger
RheinJUG 2010 - Sprechen Sie Scala?
RheinJUG 2010 - Sprechen Sie Scala?
Heiko Seeberger
Objektforum 2010 - Sprechen Sie Scala?
Objektforum 2010 - Sprechen Sie Scala?
Heiko Seeberger
W-JAX 09 - ScalaModules
W-JAX 09 - ScalaModules
Heiko Seeberger
W-JAX 09 - Lift
W-JAX 09 - Lift
Heiko Seeberger
JM 08/09 - Beginning Scala Review
JM 08/09 - Beginning Scala Review
Heiko Seeberger
JM 08/09 - ScalaModules
JM 08/09 - ScalaModules
Heiko Seeberger
OSGi DevCon Europe 09 - OSGi on Scala
OSGi DevCon Europe 09 - OSGi on Scala
Heiko Seeberger
JAX 09 - OSGi on Scala
JAX 09 - OSGi on Scala
Heiko Seeberger
JAX 08 - Agile RCP
JAX 08 - Agile RCP
Heiko Seeberger
Eclipse Magazin 12 - Design by Contract
Eclipse Magazin 12 - Design by Contract
Heiko Seeberger
JUGM 07 - AspectJ
JUGM 07 - AspectJ
Heiko Seeberger
Eclipse Magazin 16 - Die Stärke der Drei
Eclipse Magazin 16 - Die Stärke der Drei
Heiko Seeberger
Eclipse Magazin15 - Performance Logging
Eclipse Magazin15 - Performance Logging
Heiko Seeberger
Eclipse 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 matter
Heiko Seeberger
Mehr von Heiko Seeberger
(20)
Scaladays 2011 - The Ease of Scalaz
Scaladays 2011 - The Ease of Scalaz
Java Magazin - Lift
Java Magazin - Lift
JavaSPEKTRUM - Scala 3
JavaSPEKTRUM - Scala 3
JavaSPEKTRUM - Scala 2
JavaSPEKTRUM - Scala 2
JavaSPEKTRUM - Scala 1
JavaSPEKTRUM - Scala 1
RheinJUG 2010 - Sprechen Sie Scala?
RheinJUG 2010 - Sprechen Sie Scala?
Objektforum 2010 - Sprechen Sie Scala?
Objektforum 2010 - Sprechen Sie Scala?
W-JAX 09 - ScalaModules
W-JAX 09 - ScalaModules
W-JAX 09 - Lift
W-JAX 09 - Lift
JM 08/09 - Beginning Scala Review
JM 08/09 - Beginning Scala Review
JM 08/09 - ScalaModules
JM 08/09 - ScalaModules
OSGi DevCon Europe 09 - OSGi on Scala
OSGi DevCon Europe 09 - OSGi on Scala
JAX 09 - OSGi on Scala
JAX 09 - OSGi on Scala
JAX 08 - Agile RCP
JAX 08 - Agile RCP
Eclipse Magazin 12 - Design by Contract
Eclipse Magazin 12 - Design by Contract
JUGM 07 - AspectJ
JUGM 07 - AspectJ
Eclipse Magazin 16 - Die Stärke der Drei
Eclipse Magazin 16 - Die Stärke der Drei
Eclipse Magazin15 - Performance Logging
Eclipse Magazin15 - Performance Logging
Eclipse Magazin 14 - Getting hooked on Equinox
Eclipse Magazin 14 - Getting hooked on Equinox
Eclipse Magazin 12 - Security does matter
Eclipse Magazin 12 - Security does matter
Kürzlich hochgeladen
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
The Digital Insurer
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Kürzlich hochgeladen
(20)
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
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
Jetzt herunterladen