...
To run Felix, we follow the instructions described in usage.html. When we start Felix, it asks for a profile name, we will put all of our bundles in a profile named tutorial
. After running Felix, we should stop all tutorial bundles except for the service bundles. Use the ps
lb
command to make sure that only the bundles from Example 2 and Example 2b are active; use the start
and stop
commands as appropriate to start and stop the various tutorial bundles, respectively. (Note: Felix uses some bundles to provide its command shell, so do not stop these bundles.) We must also install the servicebinder.jar
bundle that we downloaded at the beginning of this example. Assuming that we saved the bundle in our tutorial directory, we install the bundle using the following command:
...
The above command installs and starts the bundle in a single step; it is also possible to install and start the bundle in two steps by using the Felix install
and start
shell commands. To stop the bundle, use the Felix stop
shell command. Use the Felix shell ps
lb
command to get the bundle identifier number for the spell checker service bundle to stop and restart it at will using the stop
and start
commands, respectively. Using the services
command, we can see which services are currently available in the OSGi framework, including our dictionary and spell checker services. We can experiment with our spell checker service's dynamic availability by stopping the dictionary service bundles; when both dictionary services are stopped, the services command will reveal that our bundle is no longer offering its spell checker service. Likewise, when the dictionary services comeback, so will our spell checker service. This bundle will work with the spell checker client bundle that we created in Example 7, so feel free to experiment. To exit Felix, use the shutdown
command.
...