Book Image

Instant OSGi Starter

Book Image

Instant OSGi Starter

Overview of this book

OSGi is a tried and true modularity standard for Java. It has in recent years gained a lot of traction and tooling; becoming frequently used in Enterprise containers and distributed software systems. "Instant OSGi Starter" is where you should start before beginning your first OSGi based project. You'll be exposed to the core concepts, gain practical experience with the most important features, and learn about the basic tenets of modular code practices. This book begins with the fundamental tools needed for building modular applications, top features with basic tenets of modular core practices and provides useful insights into resources and the community.As this book progresses you will be able to get started programming in OSGi whilst looking at the default three layer design so the application will be architected towards modularity and simplicity.Through exploring several tools and technologies and browsing the communities you will be able to work towards modular programming in OSGi.
Table of Contents (7 chapters)

Chapter 1. Instant OSGi Starter

Welcome to the Instant OSGi Starter. This book has been created especially to provide you with all the information that you need to set up OSGi. You will learn the basics, get started with building your first OSGi application, and discover some tips and tricks for using OSGi.

This book contains the following sections:

So, what is OSGi? – Find out what you can do with it, and what it can bring to your development infrastructure. OSGi is generally seen as being very complex, with many moving parts; our goal is to reduce this.

Installation – OSGi brings many runtime benefits, but before we get there we'll use several tools and technologies to build modular Java applications. BND tool, Apache Maven, Apache Karaf, Eclipse Virgo, Blueprint, and Pax Exam will be discussed.

Quick start – your first OSGi bundles – This section will get you started on programming with OSGi. We'll provide you with an example that includes creating a bundle with activator, connecting to the service registry, and constructing service consumers. We'll also provide a brief sample of using Pax Exam to test the sample system.

Top five features you'll want to know about – OSGi's three-layered design promotes modularity. However, your application needs to be architected towards modularity, simplicity, and there-use of common resources. In this section, we'll learn some of the basic tenets of modular code practices.

People and places you should get to know – There are many communities on the Internet that are working towards bettering modular programming and OSGi; it is here that you can find resources as well as help for your possible OSGi woes. This section provides you with many useful links to the project communities as well as the ongoing work.