© copyright 2004 by OSGi Alliance All rights reserved. OSGi Pre Workshop Peter Kriens, OSGi Fellow.
What's new in the OSGi Enterprise Release 5.0
-
Upload
david-bosschaert -
Category
Technology
-
view
7.951 -
download
1
description
Transcript of What's new in the OSGi Enterprise Release 5.0
![Page 1: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/1.jpg)
The OSGi R5 Enterprise Release
David Bosschaert, Red Hat Tim Diekmann, TIBCO
EEG co-chairs
![Page 2: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/2.jpg)
Agenda
• Brief Summary
• What's new in R5
• What's next?
![Page 3: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/3.jpg)
Brief Summary
• 2nd Release of Enterprise Specification
• Extends Core Specification R5
• Driving theme for this release is 'Applications' in OSGi
• Available now as an EA draft (official release follows soon)
o download from www.osgi.org
o RI and CT to be published end of June 2012
![Page 4: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/4.jpg)
What's New in R5
• Support for "Applications” and supporting services o Subsystem Service o Repository Service o Resolver Service
• Auxiliary Services and Specifications o Service Loader Mediator o Common Namespaces
• Service Updates and Enhancements o JMX Management Model o Configuration Admin o Declarative Services o Coordinator Service
![Page 5: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/5.jpg)
Subsystem Service
• Aggregation of resources (incl. bundles, subsystems) o three types: feature, composite, application
• Declarative scoping and sharing policies allow for boundaries between different applications
• Common lifecycle of resources in the same scope • Applications may be self-contained or require external resources
o uses Repository and Resolver service to identify missing resources and use policies to drive provisioning
• Defines an abstract and concrete description of the subsystem, subsystem archive (*.esa)
• Based on Core framework hooks that allow for limiting visibility and duplicate installation of bundles
![Page 6: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/6.jpg)
Subsystem Types
![Page 7: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/7.jpg)
Subsystem Archives
![Page 8: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/8.jpg)
Subsystem Archives
![Page 9: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/9.jpg)
Nested Subsystems
"Turtles All The Way Down"
• A subsystem can contain a subsystem, thereby, allowing subsystems inside subsystems
• The framework itself is the root subsystem that all other subsystems are installed into
![Page 10: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/10.jpg)
Repository Service
• A Service to access Repositories (local or remote) o Bundle or other Resource o Query on Generic Capabilities (introduced in Core R4.3 spec)
• Provides resources that can be installed and used in Resolve operations
• Can be used standalone or with Subsystems / Resolver
• Defines XML Schema for repository description o Interchange format
![Page 11: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/11.jpg)
Repository Service Examples
![Page 12: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/12.jpg)
Resolver Service
• Allow management agents to do provisioning o "Find me everything I need to deploy so that this bundle resolves"
• Can resolve any constraint expressed as a generic capability/requirement o Not limited to predefined OSGi namespaces
• Designed to work with Repository Services for dependencies
• Can be used for what-if scenarios o "Will this combination of bundles resolve?"
![Page 13: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/13.jpg)
Resolver Example
![Page 14: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/14.jpg)
OSGi ServiceLoader Mediator
java.util.ServiceLoader is non-modular by design • expects global visibility: classloader issues • encapsulation issues: exposure of internals • hard to get working in general
OSGi ServiceLoader Mediator spec:
1. Services found in META-INF/services registered in OSGi ServiceRegistry with serviceloader.mediator property
2. Clients using ServiceLoader.load() can be made to work as-is generally involves weaving, other implementations possible
![Page 15: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/15.jpg)
Common Namespaces • Generic Requirement-Capability model
o Introduced in Core 4.3 o Can be used by Bundles, Resolver, Repository, etc o Capability types defined using Namespaces
• Enterprise R5 adds Capability Namespaces for: o Services:
"I provide a Configuration Admin service" Provide-Capability: osgi.service; ! objectClass=org.osgi.service.cm.ConfigurationAdmin"
o Extenders: "I require a Blueprint implementation"
Require-Capability: osgi.extender;! filter:="(osgi.extender=osgi.blueprint)”"
o Contracts: Instead of individual imports: "I need the Servlet 2.5 API"
Require-Capability: osgi.contract;! filter:="(&(osgi.contract=Servlet)(version>=2.5))”!
![Page 16: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/16.jpg)
Service Updates and Enhancements
• JMX Management Model o API updates and support Bundle Wiring API
• Configuration Admin Service o SynchronousConfigurationListener!
Allow 'transactional' configuration updates across PIDs when used with the Coordinator Service
o Targeted PIDs Address specific bundle when multiple bundles listen to the same PID, e.g.
MS and MSF from different versions o Allow multiple bundles to share the same configuration
• Declarative Services o Build-time only annotations that are processed by tools like BndTools to
create runtime XML component declarations
• Coordinator Service o Allows coordination across APIs
(e.g. ConfigurationAdmin updating multi-PID updates)
![Page 17: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/17.jpg)
What's Next
• "OSGi In The Cloud" o see workshop during EclipseCon 2012
• Blueprint enhancements o Transactions o Configuration Admin integration o Namespaces
• WebApp enhancements and update • Asynchronous services / Scala actors support • Javascript support • CDI integration • EJB support • JavaEE package version handling • ... more ...
![Page 18: What's new in the OSGi Enterprise Release 5.0](https://reader033.fdocuments.in/reader033/viewer/2022052822/554f78d1b4c905435d8b45e5/html5/thumbnails/18.jpg)
More
• OSGi Website: www.osgi.org
• OSGi Core Specification R5: http://www.osgi.org/download/osgi.core-5.0.0-pfd.pdf
• OSGi Enterprise Specification R5: http://www.osgi.org/download/osgi.enterprise-5.0.0-pfd.pdf
• OSGi BoF Tuesday 19:00 • "OSGi In The Cloud" workshop
at EclipseCon 2012 o Thursday March 29, 09:00 am o register: http://osgi-cloudworkshop-2012.eventbrite.com