osgi – where do i start? · a practical introduction to osgi zoë slattery & valentin...
TRANSCRIPT
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
Practical introduction – demos
Open source or free tools
OSGi
bundle=jar + extra manifest fields
RawDeclarative services
Blueprint
InstalledResolved
Active
Let's break the problem down
DevelopCreate bundle
Unit Test
Write associated XML
TestAs a bundle
DeployRun on OSGi framework
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
BND
Demo BND
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
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.
Demo
Eclipse – BND/RAD
Maven
Most OSGi projects build using Maven
BND plugin
mvn eclipse:eclipse
Link: http://maven.apache.org/License: ASL2
Next up - deployment
DevelopCreate bundle
Unit Test
Write associated XML
TestAs a bundle
DeployRun on OSGi framework
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.
Increasing capability
Runtime options
Runtime options
Link: http://eclipse.org/equinox/License: EPL
Link: http://felix.apache.org/License: ASL2
Link: http://www.knopflerfish.org/License: BSD
PAX Runner
Link: http://paxrunner.ops4j.org/space/Pax+RunnerLicense: ASL2
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
Demo
Equinox
Pax-Runner
Karaf
Apache Aries
Link: http://incubator.apache.org/aries/License: ASL2
Blueprint
JMX
JPA
Transactions
JNDI
Application
Apache Geronimo
Link: http://geronimo.apache.org/License: ASL2
DEMO?
Eclipse Gemini
Link:http://www.eclipse.org/gemini/ License: EPL
Eclipse Virgo
Link: http://www.eclipse.org/virgo/License: EPL
DEMO?
Demo
Geronimo – if time
PAX Exam
Link: http://srv07.ops4j.org:8081/display/paxexam/Pax+ExamLicense: ASL2
In Summary
There are good OSGi tools – they will get better
It's not hard to get started :-)
Questions?