Fork me on GitHub
Subscribe to RSS Feed

Neil Bartlett

Advanced OSGi — Training

This 2-day workshop is a follow-on to the OSGi Fundamentals course, and fills in many of the details that will enable you to become a highly skilled OSGi developer.

On day one you will take a deep dive into OSGi services, looking at the details of how they work at the lowest level using the OSGi APIs directly. You will learn about Service Trackers, including when they should be used (and when they should be avoided!), about cardinality and selection rules, service properties and filtering. You will also look at the problems associated with Java multi-threading and how concurrency impacts the correct use of services.

Next you will learn about the full module lifecycle, and about another very common and useful pattern known as the “extender” pattern. You will look at existing examples of extenders such as the Eclipse Extension Registry, and build your own extender.

At the end of day one and continuing into day two, you will review the Compendium of useful services offered by the OSGi specification, and also useful third-party modules. This will include: Event Admin (for asynchronous event delivery); Configuration Admin (for managing configuration data); Metatype Service (for defining metadata about services); HTTP Service (for building lightweight web servers without a traditional servlet container); and User Admin (for administering users, roles and authorisations).

The course concludes with a look at the most advanced OSGi topics including service hooks, integrating legacy and/or native code, embedding OSGi into an existing Java application or server, and the use of alternative JVM languages (e.g., Scala, Groovy, Clojure).

The course is very practical and comprises hands-on programming exercises throughout.

Who Is This Course For?

If you are a Java developer interested in gaining a thorough understanding of OSGi and how to use it to build highly modular, extensible applications, then this course is for you.

Course Prerequisites

To benefit from this course you must have completed the Fundamentals of OSGi course.

Also you should be a competent Java developer or hands-on technical architect and you will need to have a good understanding of the core Java APIs. Some experience with using a build tool such as ANT and an IDE such as Eclipse will be useful, but not essential.

Course Labs & Exercises

30% Labs, 70% Presentation

Detailed Programme


The Services APIs

How Services Really Work

Tracking Services




Bundle Lifecycle

Extending Without Code


Event Admin

Declarative Services in Depth

Configuration Admin

Metatype Service

HTTP Service

Log Service

User Admin Service


Service Hooks

Legacy and Native Code

Embedding OSGi

Alternative JVM Languages