Time for action - packaging and installing

Let's bundle it all up, and deploy it, then install and start it on the framework. By now, building and deploying a bundle is second nature for you, so the details for that are not included here.

With the building of the bundle and its deployment to the releases repositories being completed successfully, we prepare the framework for the bundle install.

The shell extension bundles fit on start level 5, as defined in Chapter 1, Quick Intro to Felix and OSGi. Here we set the initial start level for all the newly installed bundles to 5 and change the framework level as well.

g! bundlelevel -i 5

g! frameworklevel 5

Refresh the OBR repository and get the updated list using:

g! repos refresh file:///C:/projects/felixbook/releases/repository.xml
g! list book
Bookshelf Inventory API (1.5.0)
Bookshelf Inventory Impl - Mock (1.5.0)
Bookshelf Service (1.7.0)

Bookshelf Service Gogo commands (1.8.0)

Then install (and start) the newly deployed bundle:

g! deploy -s "Bookshelf Service Gogo commands"
Target resource(s):
-------------------
Bookshelf Service Gogo commands (1.8.0)

Deploying...done.

The bundle listing should now be something like the following lines:

g! lb
START LEVEL 5
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.1)
1|Active | 1|Apache Felix Bundle Repository (1.6.2)
2|Active | 1|Apache Felix Gogo Command (0.6.0)
3|Active | 1|Apache Felix Gogo Runtime (0.6.0)
4|Active | 1|Apache Felix Gogo Shell (0.6.0)
5|Active | 2|Bookshelf Inventory API (1.5.0)
6|Active | 2|Bookshelf Inventory Impl - Mock (1.5.0)
7|Active | 3|Bookshelf Service (1.7.0)

8|Active | 5|Bookshelf Service Gogo commands (1.8.0)

The newly installed bundle is now active and we can give it a try.

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

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