Top Banner
COPYRIGHT © 2008-2012 OSGi Alliance. All Rights Reserved, © IBM Corp. 2012 Subsystems: for those occasions where bundles are just too small Tom Watson IBM March 27 st 2012 OSGi Alliance Marketing © 2008-2010 . All Rights Reserved Page 1
65

Subsystems for those occasions where bundles are just too small... - Tom Watson

May 13, 2015

Download

Technology

mfrancis

Presentation by Tom Watson (IBM) at OSGi DevCon 2012 BOF (22 March, 2012)

Video recording of presentation is available at http://youtu.be/3uq729vFQEc

Enterprise OSGi 4.2 standardized the use of a number of component models for developing Enterprise OSGi applications: Servlet, JSP, Blueprint, and JPA. Implementations of these specifications have since become available in many open source projects and products such as Apache Aries, Eclipse Gemini/Virgo, GlassFish, JBoss Application Server and WebSphere Application Server. Looking at a number of these environments, it's clear that when it comes to assembly and deployment there's still something missing, namely something to represent a collection of bundles (e.g. an Application). Eclipse Virgo has "PARs" and "Plans", Apache Aries has "Applications", and WebSphere Application Server has “Applications” and “Composites”. Looking further afield to kernel projects, other bundle collection concepts exist, such as Apache Karaf "Features". Each model has concepts in common, such as identity, versioning and content, but also differences like isolation and format. It is clear that this is an area of Enterprise OSGi that could benefit from standardization and hence the Subsystems specification is being created for the Enterprise OSGi 5.0 specification.

Subsystems is an OSGi specification which standardizes artifacts representing collections of bundles, such as an Application. This presentation will introduce the Subsystems design. It will describe how Subsystems can be used for development and deployment of bundle collections with different isolation semantics, to address the application, composite and feature use cases seen in the OSGi community today. The OSGi framework provides a powerful runtime for the Java platform, which promotes strong modularity, versioning and dynamic management of bundles. Bundles installed in the framework are expected to collaborate and live together sharing the same service registry and public class space. Until now there was no standard way to provide additional isolation and lifecycle to a collection of bundles installed in a single framework. This presentation will discuss how the subsystems specification can be used to provide additional isolation to a collection of bundles or applications installed into the framework.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Subsystems for those occasions where bundles are just too small... - Tom Watson

COPYRIGHT © 2008-2012 OSGi Alliance. All Rights Reserved, © IBM Corp. 2012

Subsystems:for those occasions where bundles are just too small

Tom Watson

IBM

March 27st 2012

OSGi Alliance Marketing © 2008-2010 . All Rights Reserved Page 1

Page 2: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 2 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Agenda

MotivationModelTypesMeta-dataPackagingLife-cycle and API

Page 3: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 3 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Motivation

Enterprise Java platforms are awash with bundle collectionsApache Aries – ApplicationsApache Geronimo - ApplicationsApache Karaf – FeaturesEclipse Virgo – Plans, PARsIBM WebSphere Application Server – Applications and CompositeOracle GlassFish – ApplicationsParemus Service Fabric – SystemsCrying out for standardizationPortabilityToolsEcosystem

Page 4: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 4 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Hierarchy

Subsystem Hierarchy Each has 1 or more parents (except root)

subsystem

root

Page 5: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 5 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Hierarchy

Subsystem Hierarchy Each has 1 or more parents (except root)Each can have many children subsystem

S1 S2

S3

S4

root

S5

Page 6: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 6 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Hierarchy

Subsystem Hierarchy Each has 1 or more parents (except root)Each can have many childrenEach is contained in a Region

RegionsProvides isolation for a group of one

or more subsystemsDefined by a scoped subsystem

subsystem

region

S1 S2

S3

S4

root

S5

Page 7: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 7 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Sharing Policies

Scoped subsystems control the sharing policy

root

S1 S2

bundlerequirementcapability

A BY Y

Page 8: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 8 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Sharing Policies

Scoped subsystems control the sharing policy A region provides isolation

root

S1 S2

bundlerequirementcapability

A BY Y

X

Page 9: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 9 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Sharing Policies

Scoped subsystems control the sharing policyA region provides isolationSelectively export capabilities to the parent

root

S1 S2

bundlerequirementcapability

A BY Y

exports Y

Page 10: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 10 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Sharing Policies

Scoped subsystems control the sharing policyA region provides isolationSelectively export capabilities to the parentSelectively import capabilities from the parent

root

S1 S2

bundlerequirementcapability

A BY Y

imports Y exports Y

Page 11: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 11 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Model: Sharing Policies

Scoped subsystems control the sharing policyA region provides isolationSelectively export capabilities to the parent

Selectively import capabilities from the parent

Unscoped subsystemsshare everything with other

subsystems contained in the same region S1 S2

U1

root

bundlerequirementcapability

A BY Y

imports Y exports Y

CY

Page 12: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 12 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Features

Collection of Resources (e.g. Bundles)

AB

CD

Page 13: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 13 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Features

Collection of Resources (e.g. Bundles)Shared life-cycle

F2F1

AB

CD

Page 14: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 14 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Features

Collection of Resources (e.g. Bundles)Shared life-cycleCan have children

F2F1

AB

CD

F3F

Page 15: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 15 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Features

Collection of Resources (e.g. Bundles)Shared life-cycleCan have childrenNo scoping, able to share resources

F2F1

ABE

C

ED

sharedresource

F3F

Page 16: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 16 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Features

Collection of Resources (e.g. Bundles)Shared life-cycleCan have childrenNo scoping, able to share resourcesMust be contained within a region

F2F1

ABE

C

ED

sharedresource

F3F

S1

Page 17: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 17 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Features

Collection of Resources (e.g. Bundles)Shared life-cycleCan have childrenNo scoping, able to share resourcesMust be contained within a

regionExamples: Karaf Features, Virgo unscoped Plans

F2F1

ABE

C

ED

sharedresource

F3F

S1

Page 18: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 18 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Composite

C2C1

X X

Y Y

Coarse-grained sub-assembly module

Page 19: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 19 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Composite

C2C1

Root

X X

Y Y

Import XExport Y

Import YExport X

Coarse-grained sub-assembly module

Explicit export and import of capabilities (e.g. packages, services)

Page 20: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 20 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Composite

C2C1

A

B

C

D

Root

X X

Y Y

Import XExport Y

Import YExport X

Coarse-grained sub-assembly module

Explicit export and import of capabilities (e.g. packages, services)

Composed of Resources (e.g. Bundles)

Page 21: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 21 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Composite

C2C1

A

B

C

D

Root

E E

X X

Y Y

Import XExport Y

Import YExport X

Coarse-grained sub-assembly module

Explicit export and import of capabilities (e.g. packages, services)

Composed of Resources (e.g. Bundles)

Scoped

Page 22: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 22 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Composite

C2C1

A

B

C

D

Root

E E

X X

Y Y

Import XExport Y

Import YExport X

Coarse-grained sub-assembly module

Explicit export and import of capabilities (e.g. packages, services)

Composed of Resources (e.g. Bundles)

ScopedExamples: RFC 138 Composite

Bundles*, WebSphere Composite Bundles

*old design prior to resolver hooks

Page 23: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 23 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Application

A

B

C

E

X X

YY

E

Y

B

Y

Used for composing hosted applications using Resources (e.g. Bundles)

Page 24: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 24 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Application

A2A1

A

B

C

E

X X

YY

E

Y

B

Y

Used for composing hosted applications using Resources (e.g. Bundles)

Scoped

Page 25: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 25 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Application

A2A1

A

B

C

Root

E

X X

C

YY

E

Y

B

Y

Used for composing hosted applications using Resources (e.g. Bundles)

ScopedNo exporting capabilities,

implicit imports of dependencies

Page 26: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 26 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Types: Application

A2A1

A

B

C

Root

E

X X

C

YY

E

Y

B

Y

Used for composing hosted applications using Resources (e.g. Bundles)

ScopedNo exporting capabilities,

implicit imports of dependencies

Examples: Aries Application, Virgo Scoped Plans, Virgo PARs

Page 27: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 27 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Example Combination

Subsystem Types can be mixed ‘n’ matchedExample shows:Features used to assemble a CompositeComposite providing a ‘platform’ to Applications

C1

Root

F2F1

A

B

C

D

E E

X X

Y Y

A2A1

F FX X

G H

Page 28: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 28 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Meta-data

Manifest format with relaxed rulesOSGI-INF/SUBSYSTEM.MF

Some headers unique to Subsystem typeCommon concepts use same headersHeaders cover:Identity and typeContentSharing policyHuman readable information

Page 29: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 29 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Meta-data: Identity Headers

Identified by symbolic name version

Manifest-Version: 1.0Subsystem-ManifestVersion: 1.0Subsystem-SymbolicName: my.first.subsystemSubsystem-Version: 1.0.0

Page 30: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 30 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Meta-data: Type Header

Type governs the sharing policyStandard Types:osgi.subsystem.applicationosgi.subsystem.compositeosgi.subsystem.featureOne directive specified for controlling where dependencies are installed

Manifest-Version: 1.0Subsystem-ManifestVersion: 1.0Subsystem-SymbolicName: my.first.subsystemSubsystem-Version: 1.0.0Subsystem-Type: osgi.subsystem.application; provision-policy:=acceptDependencies

Page 31: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 31 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

ContentIdentifies the resources contained in the SubsystemResources identified by name, version (range) and typeComposites only allow fixed versionsStandard typesosgi.bundle (default)osgi.fragmentsubsystem typesCan be optional

Manifest-Version: 1.0Subsystem-ManifestVersion: 1.0Subsystem-SymbolicName: my.first.SubsystemSubsystem-Version: 1.0.0Subsystem-Type: osgi.subsystem.application; provision-policy:=acceptDependenciesSubsystem-Content: an.osgi.bundle1;version="[1.0, 1.1)", an.osgi.subsystem; type=osgi.subsystem.application; version="[1.2, 1.3)"

Page 32: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 32 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Explicit Sharing

Composite subsystems share nothing unless explicitly statedRe-use existing bundle headers where applicableNot applicable for implicitly isolated subsystems (i.e. Features and Applications)

Manifest-Version: 1.0Subsystem-ManifestVersion: 1.0Subsystem-Name: A Composite SubsystemSubsystem-Description: This is a Composite SubsystemSubsystem-SymbolicName: my.first.compositeSubsystem-Version: 1.0.0Subsystem-Type: osgi.subsystem.compositeSubsystem-Content: an.osgi.bundle1;version="[1.0, 1.0]", an.osgi.bundle2;version="[1.0, 1.0]"Subsystem-ExportService: exported.service.Interface; filter:="(color=blue)"Subsystem-ImportService: imported.service.InterfaceExport-Package: an.exported.pkg;version="1.0"Import-Package: an.imported.pkg;version="[1.0, 2.0)"Require-Bundle: a.required.bundle; bundle-version="[1.0, 2.0)"

Page 33: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 33 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Informational

Headers for humans Manifest-Version: 1.0Subsystem-ManifestVersion: 1.0Subsystem-Name: First SubsystemSubsystem-Description: This is my first ever Subsystem and it's sooo cool.Subsystem-SymbolicName: my.first.subsystemSubsystem-Version: 1.0.0Subsystem-Type: osgi.subsystem.application; provision-policy:=acceptDependenciesSubsystem-Content: an.osgi.bundle;version="[1.0, 1.1)", an.osgi.subsystem; type:=osgi.subsystem.application; version="[1.2, 1.3)"

Page 34: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 34 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

PortabilitySubsystem Manifests are portable to a pointTarget Environment + Transitive Dependencies must support the required resource implementation types (e.g. Blueprint, WAB, DS, etc)Deployment manifests may be portableDifferent Target Environments likely to require different Transitive Dependencies

Subsystem Definition

Target Environment

Dependencies

Page 35: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 35 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Packaging

Packaged in a Subsystem ArchiveA zip file with .esa extension:Subsystem Manifest (optional)Deployment Manifest (optional)Resources (optional)

my.first.subsystem.esa

OSGI-INF/SUBSYSTEM.MF

OSGI-INF/DEPLOYMENT.MF

an.osgi.bundle-1.0.0.jar

an.osgi.bundle2-1.0.0.jar

Page 36: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 36 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem ServiceLife-cycle managementInstall, start, stop, uninstall

Each subsystem logically has it’s own Subsystem serviceNavigationgetParents, getChildren, getConstituents

IntrospectiongetHeaders, getState, getSymbolicName, getVersion, getLocation

C1

Root

F2F1

A

B

C

D

A2A1

F F

G H

C1, F1, F2(A1, A2)

A1 A2

(ALL)

Page 37: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 37 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Installing

Root(Subsystem)

Root Subsystem Service

Page 38: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 38 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: InstallingRoot Subsystem Service

used to install subsystems

Root(Subsystem)

A1

install()

installing

Page 39: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 39 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Installing

A1

Root(Subsystem)

A, B, C, D,E, F, G

install()

installing

Root Subsystem Serviceused to install subsystems

Repository based provisioning

Page 40: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 40 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: InstallingRoot Subsystem Service

used to install subsystems

Repository based provisioningContent Resources (specified by

Subsystem-Content header)A1

Root(Subsystem)

A, B, C, D,E, F, G

install()

installing

A

B

Page 41: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 41 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: InstallingRoot Subsystem Service

used to install subsystems

Repository based provisioningContent Resources (specified by

Subsystem-Content header)Dependencies

A1

Root(Subsystem)

A, B, C, D,E, F, G

install()

installing

A

B

E

F

Page 42: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 42 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: InstallingRoot Subsystem Service

used to install subsystems

Repository based provisioningContent Resources (specified by

Subsystem-Content header)Dependencies

A1

Root(Subsystem)

A, B, C, D,E, F, G

installed

A

B

E

F

Page 43: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 43 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: InstallingRoot Subsystem Service

used to install subsystems

Repository based provisioningContent Resources (specified by

Subsystem-Content header)DependenciesShare capabilities

A1

Root(Subsystem)

A, B, C, D,E, F, G

installed

A

B

E

F

A2C

D

G

installed

Page 44: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 44 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Starting

A2A1

Root

A

B

C

D

E G

F

start()

Subsystem Serviceused to start subsystems

Page 45: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 45 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Starting

A2A1

Root

A

B

C

D

E G

F

start()

starting

Subsystem Serviceused to start subsystems

Effect on referenced resources

Page 46: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 46 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Starting

A2A1

Root

A

B

C

D

E G

F

start()

starting

Subsystem Serviceused to start subsystems

Effect on referenced resourcesDependencies are started when one

subsystem that uses them is started

Page 47: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 47 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Starting

A2A1

Root

A

B

C

D

E G

F

start()

starting

Subsystem Serviceused to start subsystems

Effect on referenced resourcesDependencies are started when one

subsystem that uses them is started

Content resources are started

Page 48: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 48 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Starting

A2A1

Root

A

B

C

D

E G

F

active

start()

Subsystem Serviceused to start subsystems

Effect on referenced resourcesDependencies are started when one

subsystem that uses them is started

Content resources are started

Page 49: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 49 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: StartingSubsystem Service

used to start subsystems

Effect on referenced resourcesDependencies are started when one

subsystem that uses them is started

Content resources are started

A2A1

Root

A

B

C

D

E G

F

active active

Page 50: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 50 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Stopping

A2A1

Root

A

B

C

D

E G

F

active active

stop()

Subsystem Serviceused to stop a subsystem

Page 51: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 51 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Stopping

A2A1

Root

A

B

C

D

E G

F

stopping started

stop()

Subsystem Serviceused to stop a subsystem

Effect on referenced resources

Page 52: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 52 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Stopping

A2A1

Root

A

B

C

D

E G

F

stopping started

stop()

Subsystem Serviceused to stop a subsystem

Effect on referenced resourcesContent resources are stopped

Page 53: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 53 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Stopping

A2A1

Root

A

B

C

D

E G

F

stopping started

stop()

Subsystem Serviceused to stop a subsystem

Effect on referenced resourcesContent resources are stoppedDependencies are stopped when no

subsystems that use them are active

Page 54: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 54 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Stopping

A2A1

Root

A

B

C

D

E G

F

resolved started

Subsystem Serviceused to stop a subsystem

Effect on referenced resourcesContent resources are stoppedDependencies are stopped when no

subsystems that use them are active

Page 55: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 55 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Stopping

A2A1

Root

A

B

C

D

E G

F

resolved started

stop()

Subsystem Serviceused to stop a subsystem

Effect on referenced resourcesContent resources are stoppedDependencies are stopped when no

subsystems that use them are active

Page 56: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 56 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Stopping

A2A1

Root

A

B

C

D

E G

F

resolved resolved

Subsystem Serviceused to stop a subsystem

Effect on referenced resourcesContent resources are stoppedDependencies are stopped when no

subsystems that use them are active

Page 57: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 57 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Uninstalling

A2A1

Root

A

B

C

D

E G

F

resolved

uninstall()

resolved

Subsystem Serviceused to uninstall a subsystem

Page 58: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 58 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Uninstalling

A2A1

Root

A

B

C

D

E G

F

uninstalling resolved

uninstall()

Subsystem Serviceused to uninstall a subsystem

Effect on referenced resources

Page 59: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 59 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Uninstalling

A2A1

Root

A

B

C

D

E G

F

uninstalling resolved

uninstall()

Subsystem Serviceused to uninstall a subsystem

Effect on referenced resourcesContent resources are uninstalled

Page 60: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 60 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Uninstalling

A2A1

Root

C

D

E G

F

uninstalling resolved

uninstall()

Subsystem Serviceused to uninstall a subsystem

Effect on referenced resourcesContent resources are uninstalledDependencies are uninstalled when

no subsystem is installed that uses them

Page 61: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 61 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Uninstalling

A2A1

Root

C

D

G

F

uninstalled resolved

Subsystem Serviceused to uninstall a subsystem

Effect on referenced resourcesContent resources are uninstalledDependencies are uninstalled when

no subsystem is installed that uses them

Page 62: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 62 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Uninstalling

A2A1

Root

C

D

G

F

uninstalled resolved

uninstall()

Subsystem Serviceused to uninstall a subsystem

Effect on referenced resourcesContent resources are uninstalledDependencies are uninstalled when

no subsystem is installed that uses them

Page 63: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 63 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Subsystem Lifecycle: Uninstalling

A2A1

Root

uninstalleduninstalled

Subsystem Serviceused to uninstall a subsystem

Effect on referenced resourcesContent resources are uninstalledDependencies are uninstalled when

no subsystem is installed that uses them

Page 64: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 64 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

Summary

Subsystems are the standard way to manage groups of resourcesRepository based provisioning of subsystem content and

dependenciesSubsystem types define sharing semantics API enables management of Subsystem life-cycleStandardized meta-data and packaging (.esa file)

Page 65: Subsystems for those occasions where bundles are just too small... - Tom Watson

Page 65 OSGi Alliance Marketing © 2008-2012 . All Rights Reserved,© IBM Corp. 2012

IBM and WebSphere are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.

Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.

Trademarks