osgi users' forum uk - osgi release 4 v4.2 spec overview - peter kriens

135
OSGi Next Peter Kriens OSGi Evangelist dinsdag 14 juli 2009

Upload: mfrancis

Post on 10-May-2015

2.233 views

Category:

Technology


1 download

DESCRIPTION

Presentation by Peter Kriens to OSGi Users' Forum UK on 14th July 2009 providing an overview of key elements of the next release of the OSGi specification Release 4 v4.2.

TRANSCRIPT

Page 1: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

OSGi Next

Peter KriensOSGi Evangelist

dinsdag 14 juli 2009

Page 2: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

OSGi Service PlatformCore Specification

dinsdag 14 juli 2009

Page 3: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Planning 4.2

• Core released for approval June 10

• Working on the final draft for Compendium as we speak

• Compendium : July 10

• Enterprise Release Autumn

• Residential Release Spring 2010

dinsdag 14 juli 2009

Page 4: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Legend

dinsdag 14 juli 2009

Page 5: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Legend

BundleA

BundleB

dinsdag 14 juli 2009

Page 6: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Legend

BundleA

BundleB

Service

dinsdag 14 juli 2009

Page 7: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Legend

BundleA

BundleB

Service

getService

registerService

dinsdag 14 juli 2009

Page 8: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Legend

BundleA

BundleB

Service

getService

BundleC

registerService

dinsdag 14 juli 2009

Page 9: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Legend

BundleA

BundleB

Service

getService

BundleC

registerService

addServiceListener

dinsdag 14 juli 2009

Page 10: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Legend

BundleA

BundleB

Service

getService

BundleC

registerService

Call/DependencyDirection addServiceListener

dinsdag 14 juli 2009

Page 11: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Core

• Launching

• Bundle Tracker

• Bundle-License Header

• Service Hooks

• Negative Permissions

dinsdag 14 juli 2009

Page 12: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Launching

• To be inside a framework …

• Or outside a framework ...

• That’s the question!

dinsdag 14 juli 2009

Page 13: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Launching

• Standardizes launching different frameworks

• Will enable generic launchers

• Allows you to embed a framework in your application!

dinsdag 14 juli 2009

Page 14: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

LaunchingMap<String,String> p = new HashMap<String,String>();

List<String> impls = getMetaInfServices(

loader, FrameworkFactory.class.getName());

if (impls.size() != 1) throw new RuntimeException( "Too many frameworks: "+ impls);

Class<?> clazz = loader.loadClass(impls.get(0)); FrameworkFactory factory = (FrameworkFactory) clazz .newInstance(); Framework fw = factory.newFramework(p); Bundle b = fw.installBundle( “http://.../load/…”); b.start();

dinsdag 14 juli 2009

Page 15: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bundle Tracker

• Simple tool a la Service Tracker to track bundles

• Very useful for extenders

• Bundles that provide additional functionality based on data in a bundle

• Tracks a set of states

• Handles all concurrency issues

dinsdag 14 juli 2009

Page 16: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service Hooks

• FindHook

• Intercept getServiceReference(s)

• EventHook

• Intercept Service Event delivery

• ListenerHook

• Find out who is listening to what

dinsdag 14 juli 2009

Page 17: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service HooksBundle

A

BundleB

dinsdag 14 juli 2009

Page 18: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service HooksBundle

A

BundleB

ProxyBundle

dinsdag 14 juli 2009

Page 19: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service HooksBundle

A

BundleB

FindHookEventHook

ProxyBundle

dinsdag 14 juli 2009

Page 20: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service HooksBundle

A

BundleB

FindHookEventHook

ProxyBundle

dinsdag 14 juli 2009

Page 21: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service HooksBundle

A

BundleB

FindHookEventHook

ProxyBundle

ListenerHook

dinsdag 14 juli 2009

Page 22: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service HooksBundle

A

BundleB

FindHookEventHook

ProxyBundle

ListenerHook

dinsdag 14 juli 2009

Page 23: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Negative Permissions

• Java 2 Permissions are only positive

• That is, you grant a permission P

• PackagePermission(com.acme,IMPORT)

• Very hard to say, all permissions except P

• Lack of deny permissions

dinsdag 14 juli 2009

Page 24: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Negative Permissions

DENY { [...BundleSignerCondition "cn=*, o=ACME" "!" ] (...PackagePermission "com.acme.secret.*" "import,exportonly" ) } ALLOW { (...PackagePermission "*" "*" ) }

dinsdag 14 juli 2009

Page 25: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Compendium

• Initial Provisioning

• Bundle Tracker

• Declarative Services

• Remote Services

• Blueprint Extender

dinsdag 14 juli 2009

Page 26: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote Services

• RFC 119

• Formerly Distributed OSGi

• Distribution Software uses services to:

• Maps a service to/from a remote system

• Uses a service to abstract a communication endpoint

dinsdag 14 juli 2009

Page 27: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote Services

DistributionProvider

DistributionProvider

X’

BundleB

dinsdag 14 juli 2009

Page 28: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote Services

XDistribution

ProviderDistribution

Provider

X’

BundleB

dinsdag 14 juli 2009

Page 29: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

dinsdag 14 juli 2009

Page 30: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

dinsdag 14 juli 2009

Page 31: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

dinsdag 14 juli 2009

Page 32: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports

dinsdag 14 juli 2009

Page 33: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports

dinsdag 14 juli 2009

Page 34: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports

dinsdag 14 juli 2009

Page 35: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports

dinsdag 14 juli 2009

Page 36: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports imports

dinsdag 14 juli 2009

Page 37: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports imports

dinsdag 14 juli 2009

Page 38: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports imports

dinsdag 14 juli 2009

Page 39: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports imports

dinsdag 14 juli 2009

Page 40: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote ServicesBundle

A

XDistribution

ProviderDistribution

Provider

X’

BundleB

exports imports

Framework 1 Framework 2

dinsdag 14 juli 2009

Page 41: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Remote Services

• Service Properties define the interaction

• Intents specify the required/provided capabilities

• Filters used to match

• Service Component Architecture (SCA)

• Interaction specified, not mandated

• Flexible configuration options

dinsdag 14 juli 2009

Page 42: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service Properties<other properties>

service.exported.intents

service.intents

service.exported.intents.extra

service.exported.interfaces

service.exported.configs

<other properties>

service.exported.intents

objectClass

service.imported.configs

service.imported

remote.intents.supported

remote.configs.supported

Distribution Provider

Framework 1 Framework 2

dinsdag 14 juli 2009

Page 43: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service Properties<other properties>

service.exported.intents

service.intents

service.exported.intents.extra

service.exported.interfaces

service.exported.configs

<other properties>

service.exported.intents

objectClass

service.imported.configs

service.imported

remote.intents.supported

remote.configs.supported

Distribution Provider

Framework 1 Framework 2

dinsdag 14 juli 2009

Page 44: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service Properties<other properties>

service.exported.intents

service.intents

service.exported.intents.extra

service.exported.interfaces

service.exported.configs

<other properties>

service.exported.intents

objectClass

service.imported.configs

service.imported

remote.intents.supported

remote.configs.supported

Distribution Provider

Framework 1 Framework 2

endpoint

dinsdag 14 juli 2009

Page 45: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Service Properties<other properties>

service.exported.intents

service.intents

service.exported.intents.extra

service.exported.interfaces

service.exported.configs

<other properties>

service.exported.intents

objectClass

service.imported.configs

service.imported

remote.intents.supported

remote.configs.supported

Distribution Provider

Framework 1 Framework 2

endpoint

dinsdag 14 juli 2009

Page 46: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Blueprint Extender

• RFC 124

• Provides Spring DM Functionality

• Blueprint Extender uses XML definitions in bundle to create & wire application objects

• Namespace Handler services, not yet :-(

• Provides damping

• Proxies services

dinsdag 14 juli 2009

Page 47: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Blueprint Extender

XML

dinsdag 14 juli 2009

Page 48: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Blueprint Extender

XMLBlueprintContainer

dinsdag 14 juli 2009

Page 49: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Blueprint Extender

XMLBlueprintContainer

dinsdag 14 juli 2009

Page 50: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

BeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

dinsdag 14 juli 2009

Page 51: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

BeanBeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

dinsdag 14 juli 2009

Page 52: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bean

Service

BeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

dinsdag 14 juli 2009

Page 53: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bean

Service

BeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

Reference

dinsdag 14 juli 2009

Page 54: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bean

Service

BeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

Reference

dinsdag 14 juli 2009

Page 55: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bean

Service

BeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

Reference

dinsdag 14 juli 2009

Page 56: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bean

Service

BeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

Reference

dinsdag 14 juli 2009

Page 57: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bean

Service

BeanMetadata

ServiceMetadata

ReferenceMetadata

Blueprint Extender

XMLBlueprintContainer

ApplicationObjects

Reference

dinsdag 14 juli 2009

Page 58: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Metadata

NonNull

Metadata

Null

Metadata

Component

Metadata

Service

Metadata

Service

Reference

Metadata

Bean

Metadata

Value

Metadata

Collection

Metadata

Map

Metadata

Bean

Argument

Bean

Property

ListenerRegistration

Listener

IdRef

Metadata

Ref

Metadata

Target

Props

Metadata

Reference

Metadata

Ref

Collection

Metadata

Map

Entry

dinsdag 14 juli 2009

Page 59: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

serviceobjectApp proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 60: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

serviceobjectApp proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 61: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

serviceobjectApp proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 62: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

serviceobjectApp proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 63: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

serviceobjectApp proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 64: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

serviceobjectApp proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 65: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

App proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 66: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

App proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 67: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

App proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 68: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Reference

App proxy

serviceobject

serviceobject

dinsdag 14 juli 2009

Page 69: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Damping Ref-list

serviceobjectApp proxy

serviceobject

serviceobject

List

proxy

proxy

dinsdag 14 juli 2009

Page 70: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Enterprise

• Transactions

• JDBC Database Access

• JMX

• JNDI

• JPA

• Connectors

dinsdag 14 juli 2009

Page 71: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Experimental

• TSL

• Nested Frameworks

• OBR

dinsdag 14 juli 2009

Page 72: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

TSL

• A Tiny Script Language

• Feels like a shell

• Acts like a script language

• Uses reflection, but simplifies syntax

• No new commands

• Will become Felix project

dinsdag 14 juli 2009

Page 73: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

TSLTelnetShell

ConsoleShell

...Shell

OSGiConvert.

EclipseConvert.

FelixConvert.

BasicCmnds

FrameWorkCmnds

ThreadIO

ThreadIO

CommandShell

Converter

* osgi.command.name=xxx osgi.command.function=yyy

...Cmnds

TSLImpl

dinsdag 14 juli 2009

Page 74: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

TSL $ echo Hello World Hello World $ echo <bundle 1> initial@reference:file:org.eclipse.osgi.util_3.1.200.v20070605.jar/ [1]

$ ls eclipse eclipse.ini load runner

$ ls /Ws aQute felix-trunk osgi osgi-books

dinsdag 14 juli 2009

Page 75: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

TSL

$ <bundle 6> headers Tool Bnd-0.0.169 Bundle-Activator aQute.fileinstall.FileInstall Export-Package aQute.fileinstall ... Created-By 1.6.0_01 (Sun Microsystems Inc.) Bnd-LastModified 1184160147361 Bundle-Version 1.3 Bundle-ManifestVersion2 Manifest-Version 1.0 Import-Package aQute.fileinstall, ... Bundle-Name biz.aQute.fileinstall Bundle-Description This bundle watches a .... Bundle-SymbolicName biz.aQute.fileinstall

dinsdag 14 juli 2009

Page 76: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

TSL $ help={each <<$it class> declaredmethods> {$it name }} aQute.shell.runtime.Closure@90a284 $ help <bundle 6> loadClass getResource ... checkLoader closeBundleLoader getLoaderProxy

$ echo $exception E: java.lang.NullPointerException $ echo $exception java.lang.NullPointerException $ $exception printstacktrace $ // the output is temporarily on reall stderr ...

dinsdag 14 juli 2009

Page 77: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Nested Frameworks

• Application Server Vendors want scoping of applications …

• Basic Idea OSGi is:

• The Application == the set of installed bundles

• Compromise:

• All Frameworks to be nested

dinsdag 14 juli 2009

Page 78: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

SystemBundle

dinsdag 14 juli 2009

Page 79: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

SystemBundle

CompositeBundle

dinsdag 14 juli 2009

Page 80: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle

CompositeBundle

dinsdag 14 juli 2009

Page 81: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

CompositeBundle

dinsdag 14 juli 2009

Page 82: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

dinsdag 14 juli 2009

Page 83: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

dinsdag 14 juli 2009

Page 84: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

AppBundle

A

dinsdag 14 juli 2009

Page 85: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

AppBundle

A

dinsdag 14 juli 2009

Page 86: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

AppBundle

A

dinsdag 14 juli 2009

Page 87: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

AppBundle

A

AppBundle

B

dinsdag 14 juli 2009

Page 88: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

AppBundle

A

AppBundle

B

dinsdag 14 juli 2009

Page 89: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

AppBundle

A

AppBundle

B

dinsdag 14 juli 2009

Page 90: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Framework P

Nested Frameworks

Framework CSystemBundle System

Bundle

SurrogateBundle

CompositeBundle

AppBundle

A

AppBundle

B

dinsdag 14 juli 2009

Page 91: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

dinsdag 14 juli 2009

Page 92: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

294dinsdag 14 juli 2009

Page 93: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

2947

dinsdag 14 juli 2009

Page 94: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

42dinsdag 14 juli 2009

Page 95: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

dinsdag 14 juli 2009

Page 96: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

dinsdag 14 juli 2009

Page 97: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

dinsdag 14 juli 2009

Page 98: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

dinsdag 14 juli 2009

Page 99: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

dinsdag 14 juli 2009

Page 100: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

module

dinsdag 14 juli 2009

Page 101: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

module class Foo {}

public class Bar { module int foo() {}}

module interface Baz {}

dinsdag 14 juli 2009

Page 102: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Java Modularity

Visibilityvs

Accessibility

dinsdag 14 juli 2009

Page 103: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Visibility

ClassS

ClassT

ClassT

dinsdag 14 juli 2009

Page 104: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Visibility

ClassS

ClassT

ClassT

dinsdag 14 juli 2009

Page 105: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Visibility

ClassS

ClassT

dinsdag 14 juli 2009

Page 106: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Visibility

ClassS

ClassT

dinsdag 14 juli 2009

Page 107: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Visibility

ClassS

ClassT

dinsdag 14 juli 2009

Page 108: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Visibility

ClassS

ClassT

ModuleSystem

dinsdag 14 juli 2009

Page 109: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Accessibility

public

package

module

private

dinsdag 14 juli 2009

Page 110: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Accessibility

ClassS

dinsdag 14 juli 2009

Page 111: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

class

Accessibility

ClassS

ClassT

dinsdag 14 juli 2009

Page 112: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

package

class

Accessibility

ClassS

ClassT

Class U

dinsdag 14 juli 2009

Page 113: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

module

package

class

Accessibility

ClassS

ClassT

Class U

ClassV

dinsdag 14 juli 2009

Page 114: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

module

package

class

Accessibility

ClassS

ClassT

Class U

ClassV

dinsdag 14 juli 2009

Page 115: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

module

package

class

Accessibility

ClassS

ClassT

ClassW

Class U

ClassV

dinsdag 14 juli 2009

Page 116: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Is JSR 294 aMeta Module System? (Implemented by OSGi™, Jigsaw, Guice, …)

dinsdag 14 juli 2009

Page 117: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Is JSR 294 aMeta Module System? (Implemented by OSGi™, Jigsaw, Guice, …)

No Java™ Standard for

Modules!dinsdag 14 juli 2009

Page 118: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bundle

OSGi Modules: Bundle = Module

module

dinsdag 14 juli 2009

Page 119: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bundle

OSGi Modules: Bundle = Multiple Modules

module A

module B

dinsdag 14 juli 2009

Page 120: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bundle BBundle A

module

OSGi Modules: Modules Cross Bundles

dinsdag 14 juli 2009

Page 121: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Bundle

OSGi Modules: Nested?

module A

module B

dinsdag 14 juli 2009

Page 122: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Module Dependencies

Bundle A

module A

Bundle B

module B

dinsdag 14 juli 2009

Page 123: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Module Dependencies

Bundle A

module A

Bundle B

module B

requires

provides

permits

dinsdag 14 juli 2009

Page 124: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Module Dependencies

Bundle A

module A

Bundle B

module B

requires

provides

permits?dinsdag 14 juli 2009

Page 125: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

dinsdag 14 juli 2009

Page 126: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Containers?

π 3.14

dinsdag 14 juli 2009

Page 127: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Containers?

π 3.14JLS

dinsdag 14 juli 2009

Page 128: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Containers?

π 3.14JLS JVM

dinsdag 14 juli 2009

Page 129: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Containers?

dinsdag 14 juli 2009

Page 130: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

container com.acme

Containers?

dinsdag 14 juli 2009

Page 131: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

container com.acme

Containers?

module com.acme.foo;

dinsdag 14 juli 2009

Page 132: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

container com.acme

Containers?

module com.acme.foo;

module com.acme.foo;module bar;

dinsdag 14 juli 2009

Page 133: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

container com.acme

Containers?

module com.acme.foo;

module com.acme.foo;module bar;

module com.acme.foo;module bar;private package one;

module com.acme.foo;module fiz;public package one;

dinsdag 14 juli 2009

Page 134: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

container com.acme

Containers?

module com.acme.foo;

module com.acme.foo;module bar;

module com.acme.foo;module bar;private package one;

module com.acme.foo;module fiz;public package one;

module com.acme.foo;module bar;package one;import module fiz;module class A {}

module com.acme.foo;module fiz;package two;

class B {}

dinsdag 14 juli 2009

Page 135: OSGi Users' Forum UK - OSGi Release 4 v4.2 Spec Overview - Peter Kriens

Q&A

dinsdag 14 juli 2009