Build and deploy the bundle

Build this bundle in the same way as we've done for the bookshelf-inventory-api bundle.

In the next chapter, we'll look into OBRs in greater detail. We'll then see how to install our bundles onto the Felix framework.

Pop quiz

Okay, let's see if you've been following— try answering these questions:

  1. Which OSGi interface must you extend when defining a service API in an OSGi bundle?

    a. The Service interface

    b. The BundleActivator interface

    c. None, I can pick any interface I want

  2. How do you deploy a bundle to the OBR repository once it's packaged?

    a. I need to fill out a form and submit my bundle

    b. Maven does it for me, using the deploy target

    c. I have to copy or ftp the bundle to the OBR

  3. How do you register a service on an OSGi framework?

    a. I deploy it to the OBR repository

    b. I register it using a BundleContext

    c. I don't need to do anything

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.150.123