OSGi : Develop Simple Apps

From CDOT Wiki
Revision as of 14:27, 22 January 2011 by Jordan.anastasiade (talk | contribs) (step 1)
Jump to: navigation, search


OSGi Activities



Start the lab activities in the order defined below:

  1. Check out the Service Interface
  2. Check out the Service Provider
  3. Check out the Service Consumer

Steps for Building Bundels

1. Study the Interfaces

2. Define the Bundle that provide the service (Provider Bundle)

2.1 Define the Java Interface that exposes the services

Let us suppose that you want to define a service that allows the user to find a book from the book isbn. Then the interface should look similare with this one:

package cs.ecl.osgi.simple.bookfinder;

public interface BookFinder {
	Book findBook(int isbn) throws BookNotFoundException;
}