osgi – where do i start? · a practical introduction to osgi zoë slattery & valentin...

25
OSGi – where do I start? A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald

Upload: others

Post on 22-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

OSGi – where do I start?A practical introduction to OSGi

Zoë Slattery &

Valentin Mahrwald

Page 2: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Objectives

Projects that will be useful to you in creating and building OSGi applications

Practical introduction – demos

Open source or free tools

Page 3: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

OSGi

bundle=jar + extra manifest fields

RawDeclarative services

Blueprint

InstalledResolved

Active

Page 4: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Let's break the problem down

DevelopCreate bundle

Unit Test

Write associated XML

TestAs a bundle

DeployRun on OSGi framework

Page 5: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

In the beginning there was....BND Link:http://www.aqute.biz/Code/Bnd

License: ASL2

Manifest-Version: 1.0Export-Package: org.example.api;version="0.0.0"Bundle-Version: 0.0.0Bundle-Name: org.example.apiBundle-ManifestVersion: 2Bundle-SymbolicName: org.example.api

Page 6: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

BND

Demo BND

Page 7: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Eclipse BND Tools

Link: http://njbartlett.name/bndtools.htmlLicense: EPL

Java CodeOSGi

A rich forms-style editor for Bnd descriptor files,

Integration of Bnd into the Eclipse incremental build

Page 8: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

IBM Rational Development Tools for OSGi Applications 1.0

Link: http://marketplace.eclipse.org/content/ibm-rational-development-tools-osgi-applicationsLicense: IBM Commercial (Free but not open source)

Java Code

OSGi

http://www.eclipse.org/proposals/osgi-enterprise-tools/

Create and edit OSGi bundles, applications.

Convert Java EE web, JPA, plug-in, or Java projects into OSGi bundles.

Edit OSGi application manifest files.

Create and edit OSGi blueprint configuration and binding configuration files.

Page 9: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Demo

Eclipse – BND/RAD

Page 10: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Maven

Most OSGi projects build using Maven

BND plugin

mvn eclipse:eclipse

Link: http://maven.apache.org/License: ASL2

Page 11: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Next up - deployment

DevelopCreate bundle

Unit Test

Write associated XML

TestAs a bundle

DeployRun on OSGi framework

Page 12: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

OSGi deployment

My Application Bundle

OSGi

The Vision ...more oftenThe VisionThe Vision

My Application Bundle

OSGi

org.osgi.framework.BundleException: The bundle could not be resolved.

Page 13: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Increasing capability

Runtime options

Page 14: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Runtime options

Link: http://eclipse.org/equinox/License: EPL

Link: http://felix.apache.org/License: ASL2

Link: http://www.knopflerfish.org/License: BSD

Page 15: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

PAX Runner

Link: http://paxrunner.ops4j.org/space/Pax+RunnerLicense: ASL2

Page 16: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Apache Karaf

Link: http://karaf.apache.org/License: ASL2

OSGi

AdminConsole Logging BlueprintDeployerProvisioning

Karaf

Hot deployment

Dynamic configuration

Logging System

Provisioning

Extensible Shell console

Security framework based on JAAS

Supports Apache Felix Framework 3.0 and Eclipse Equinox 3.6

Page 17: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Demo

Equinox

Pax-Runner

Karaf

Page 18: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Apache Aries

Link: http://incubator.apache.org/aries/License: ASL2

Blueprint

JMX

JPA

Transactions

JNDI

Application

Page 19: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Apache Geronimo

Link: http://geronimo.apache.org/License: ASL2

DEMO?

Page 20: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Eclipse Gemini

Link:http://www.eclipse.org/gemini/ License: EPL

Page 21: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Eclipse Virgo

Link: http://www.eclipse.org/virgo/License: EPL

DEMO?

Page 22: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Demo

Geronimo – if time

Page 23: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

PAX Exam

Link: http://srv07.ops4j.org:8081/display/paxexam/Pax+ExamLicense: ASL2

Page 24: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

In Summary

There are good OSGi tools – they will get better

It's not hard to get started :-)

Page 25: OSGi – where do I start? · A practical introduction to OSGi Zoë Slattery & Valentin Mahrwald. Objectives Projects that will be useful to you in creating and building OSGi applications

Questions?