To serve our ever-growing OSGi community, the Alliance has gathered some basic educational material on understanding and using OSGi technology. The following set of external and internal links below include a brief textual extract from the original authors explaining the linked resource.
More educational opportunities are available at OSGi Alliance events like OSGi DevCon and OSGi Community Event. Slides from these events’ talks are available for review as well.
If you are ready to start building an application on OSGi, visit OSGi enRoute for an easier start on your application’s OSGi infrastructure.
MEMBER COMPANY TRAINING
The following is a list of member company implementations that provide training on the OSGi Service Platform specification:
EDUCATION
“Getting Started with OSGi”
A tutorial series by Neil Bartlett (February-June 2007)
The following is a list of links to my tutorial series Getting Started with OSGi which is currently running on EclipseZone.
Unfortunately on EclipseZone the new posts push the older ones off the front page, so if you want to refer back to an earlier item in the series then you have to go digging through the forums.
Therefore for convenience I will be maintaining links to all parts of the series on this page.
- Part 1: Your first bundle
- Part 2: Interacting with the Framework
- Part 3: Dependencies between Bundles
- Part 4: Registering a Service
- Part 5: Consuming a Service
- Part 6: Dynamic Service Tracking
- Part 7: Introducing Declarative Services
- Part 8: Declarative Services and Dependencies
You may also be interested in my more advanced article, A Comparison of Eclipse Extensions and OSGi Services.
“Component Programming with OSGi“
by Thomas Watson (IBM) and Peter Kriens (OSGi Alliance)
…This tutorial will show you hands-on how to develop applications based on OSGi bundles (plug-ins are bundles). We will start with a simple “Hello World” application that highlights the modularity and life cycle features. This application is then further developed into a web based application that uses services from other bundles, as well as providing services to other bundles. We will show you what is under the covers as well as how Eclipse keeps any complexity under those covers. After this tutorial you will be able to write better, more flexible, more standalone, and more dynamic bundles that can be deployed in any OSGi service platform (Eclipse’s Equinox or others).
“OSGi Best Practices!“
by BJ Hargrave, OSGi Fellow and CTO, and Peter Kriens, OSGi Fellow & Director of Technology
Learn how to prevent common mistakes and build robust, reliable, modular, and extendable systems using OSGi™ technology
“Developing OSGi Enterprise Applications“
by Jeremy Hughes and Alasdair Nottingham, IBM (September 2010)
With the release of OSGi Enterprise 4.2 specifications, the role of OSGi has been extended into the enterprise alongside what has traditionally been developed using JEE. This tutorial will introduce you to building OSGi technology based enterprise applications, and explain both differences and improvements over traditional JEE applications. We will use Eclipse based and other freely available tools to develop bundles supporting the Blueprint programming model, Web, and JPA 2.0 technologies. The resulting application will be deployed to a runtime enabled by Apache Aries.
“Creating an OSGi bundle“
By Glen Normington, VMware/SpringSource
Friday, January 05, 2007
Newcomers to OSGi may like a simple guide to developing an bundle. Peter Kriens has provided an extensive tutorial which is a must for anyone serious about learning OSGi. However, it has a long introduction and assumes you are happy to run Eclipse. So I thought I would provide a trival example that people could get going using only a Java SDK and their favourite text editor.
Here are instructions to create and run a trivial bundle, hopefully in about 10 minutes.
“Apache Felix Project OSGi Tutorial“
This tutorial creates successively more complex OSGi bundles to illustrate most of the features and functionality offered by the OSGi framework.
Trails:
- Apache Felix Tutorial Example 1: A bundle that listens for OSGi service events.
- Apache Felix Tutorial Example 2: A bundle that implements a dictionary service.
- Apache Felix Tutorial Example 2b: A bundle that implements another dictionary service.
- Apache Felix Tutorial Example 3: A bundle that implements a simple dictionary service client.
- Apache Felix Tutorial Example 4: A bundle that implements a more robust dictionary service client.
- Apache Felix Tutorial Example 5: A bundle that implements a dictionary service client using the Service Tracker.
- Apache Felix Tutorial Example 6: A bundle that implements a spell checker service using dictionary services.
- Apache Felix Tutorial Example 7: A bundle that implements a spell checker service client.
- Apache Felix Tutorial Example 8: A bundle that implements a spell checker service using Service Binder.
“Apache Aries Project OSGi Blueprint “Hello World” Tutorial“
This tutorial is designed for people who are starting to use the Apache Aries Blueprint implementation. After you have worked through the tutorial you will – be able to run a very simple piece of code in the Aries Blueprint container – understand bean, service and reference definitions in Blueprint
The tutorial assumes a basic working knowledge of Java development, Eclipse and some understanding of OSGi.
“Apache Aries Project OSGi Blueprint “Greeter” Tutorial“
This tutorial takes a slightly longer look at Blueprint [than “Hello World”] and works through the process of converting an OSGi project to use Blueprint.
It is aimed at people who already have some familiarity with OSGi.
“OSGi Tutorial, A Step by Step Introduction to OSGi Programming, Based on the Open Source Knopflerfish OSGi Framework, V2“
By Sven Haiges 2004 sven.haiges@vodafone.com
Updated by Erik Wistrand 2009 wistrand@makewave.com
This tutorial introduces you to OSGi programming based on the open source Knopflerfish OSGi framework. I chose Knopflerfish, because it is easy to install and provides a great desktop GUI, that will help you to get your first bundles deployed in an OSGi Framework.
First, the reader is quickly introduced to the installation of Knopflerfish. Second, you will create your first OSGi bundle and deploy it in this framework. Step by step, you will create more bundles, register and retrieve services and manage their dependencies. By the end of this tutorial, you should have a basic understanding of OSGi programming.
“The OSGi Complete“
By Dr. Pavlin Dobrev and Stoyan Boshev, ProSyst Software Labs
OSGi defines a huge set of services that are not well known to the application developers. Some of these services are Wire Admin, IO Connector, Initial Provisioning and Declarative Services. These services are donated to Eclipse in 2007 from ProSyst and it is expected to be included in the next Eclipse major release.
This tutorial will focus on main problems, solutions and code snippets related to the usage of the OSGi services. Some topics which will be addressed are:
- OSGi Wire Admin Service Specification
- OSGi IO Connector Service Specification
- OSGi Initial Provisioning
- OSGi Declarative Services Specification
- Example Usage
The tutorial will include set of programming examples and demonstrations involving different OSGi services.
“Explore Eclipse’s OSGi console, Use and extend the console that drives Eclipse“
By Chris Aniszczyk (zx@redhat.com), Principal Software Engineer, Red Hat Inc.
30 Jan 2007, Level: Intermediate
Get acquainted with the hidden gem known as the OSGi (Equinox) console and find out how it can be added to an Eclipse developer’s toolbox. And learn how to extend the console to further add to the toolbox.
“Getting started with Spring-OSGi“
by Peter Doornbosch, luminis
26-Aug-2007
With the introduction of Spring OSGi, it becomes relatively easy to split up a Spring application in separate OSGi bundles, and have a much more modular application architecture, without all the classloading hassle you may encounter when deploying components in J2EE application servers.
“Getting started with Spring-OSGi — part 2“
26-Sep-2007
In the previous blog entry about Spring-OSGi, we demonstrated how to develop a simple Spring-OSGi bundle that exposes a Spring bean as an OSGi service. In this installment we’ll have a look at how you can use OSGi services in a Spring-OSGi bundle. The sample code used in this blog builds on the sample of the previous blog and can of course be downloaded from our site.
“Building Composite Applications, one of the IBM Redbooks“
by Juan R. Rodriguez, Alex Barbosa Coqueiro, Belen Gonzalez Agudo, Sunil Patel, Ricardo Rossi, Rafael Sanchez, Robert Schneider, Guillermo Villavicencio, Art Whorley, and Michael Zink
July 2007
Learn about composite applications, and component intercommunication
TUTORIALS
- Lotus Expeditor
Lotus Expeditor (formerly IBM WebSphere Everyplace Deployment) is a universally managed client that includes a client, server, and toolkit for creating, deploying, and maintaining both mobile and rich client applications. This OSGi-based and Eclipse-based platform enables you to create Service-Oriented Architecture (SOA) solutions.
Updated 24 Apr 2007 - Migrating Eclipse RCP applications to IBM Lotus Expeditor
developerWorks Level: Intermediate
Peter Xu, Senior Managing Consultant, IBM Software Services for WebSphere, IBM
24 Apr 2007 - Creating collaborative components for IBM Lotus Expeditor Property Broker
developerWorks Level: Intermediate
Bob Balfe, Senior Software Engineer, IBM
19 Dec 2006 - Building and deploying a simple Web Services Resource in IBM Lotus Expeditor
developerWorks Level: Intermediate
Sivananthan Perumal, Senior Staff Software Engineer, IBM
05 Dec 2006 - Developing an OSGi service as a Web service in IBM Lotus Expeditor
developerWorks Level: Intermediate
John Hsu, Software engineer, IBM
28 Nov 2006
LINKS
- OSGi Best Practices by OSGi Fellows Hargrave and Kriens
- Neil Bartlett and Alex Blewitt presentation to JSig on the benefits of the OSGi platform
- The Eclipse 3.0 platform: Adopting OSGi technology
- A Comparison of Eclipse Extensions and OSGi Services
- OSGi Tutorial – A Step by Step Introduction to OSGi Programming Based on Knopflerfish
- Getting started with OSGi: tutorials from EclipseZone
- OSGi and Gravity Service Binder Tutorial
- TheServerSide.com Article about Eclipse Equinox and OSGi
- Understanding how Eclipse plug-ins work with OSGi
- Explore Eclipse’s OSGi console
- ApacheCon EU 2006 presentation about OSGi best practices by Marcel Offermans
- OSGi R4 Service Platform: Java Modularity and Beyond by Dr. Richard S. Hall
- NTT Perspectives on the related activities of the OSGi Alliance and the Home Gateway Initiative (HGI)
- Aperi Storage Management Project – EPL open source storage management framework built on OSGi technology
- SIP Communicator — open source VoIP and Instant Messaging client based on OSGi technology
- JOnAS – open source Java Enterprise Edition (Java EE) Application Server built on an OSGi Framework
- Interview: Florent Benoit on the EasyBeans EJB3 Container and OSGi Support
- Mule integration with OSGi technology — Mule, open source Enterprise Service Bus (ESB) project


