OSGi Manager User's Guide
Introduction
OSGi Manager
provides access to
some of the most relevant working parameters of the OSGi Framework and
lets the user watch and edit them, thus affecting the
framework’s
behaviour and operating status.
OSGi Manager is a web application, and as such is presented in an web
browser. Depending on the browser, some presentation features
might vary slightly, yet the general appearance and functionality
remain as depicted in this guide across different platforms.
The application has been tested in two browsers: Firefox and Internet
Explorer.
Finally, it is recommended to read the OSGi Release 3 specification in
order to completely understand what can be do with this tool.
General
Structure
The general structure of the application is composed of a
title bar
on top of the screen, a navigation menu, or main menu, to the left of
the screen, and the main area, where information about each item is
displayed.
This is the login screen, which can be found when accessing the
application:

In the above image the general structure is shown, common to all the
pages in the web site. In addition, the login dialog is presented in
the main section of the page. This login is requested to keep track of
each user’s preferences and established connections.
While the title bar is identical for all the pages in the web site, the
main area is different for each page, and the main menu varies slightly
depending of the situation as well. These variations take place when a
login is performed, and when a connection is established. Both these
events trigger the appearance of an additional information field in the
main menu, as shown in the figure.
Functionalilty
The manager’s functionality can be split up in
different
blocks, roughly corresponding to the different entries in the main
navigation menu, located on the left end of the screen.
First, the application counts on some facilities that have to do with
the connection between the framework and the application. These can be
found under Connections in the main menu. What it's seen under
the
other sections depends on the state of the existing connections.
The OSGi Manager shows general information about the framework and is
also capable of listing all the bundles and services registered in the
framework, as well as performing different operations with them. These
features are listed as Framework, Bundles and Services in the main menu.
Finally, some of the services of the OSGi specification that are more
relevant to adjust the operating conditions of the framework are mapped
and given a management interface in the OSGi Manager. These services
are the Package Admin, Start Level, Permission
Admin, Log,
and Configuration Admin services, and their interfaces can be
found on the main menu under the items with the same name.
Next follows a more detailed explanation of each one of the
application’s features.
Connections
The connections dialog is accessible via the left menu item
with the
same name. When clicked, this menu shows a first screen with a list of
the connections the user has already created in present or previous
sessions. This list presents a link to another view showing extended
information on the connection, and some short information about its
status – whether it is connected or not, and if it is the
active.

It is possible to have multiple connections created at any time, and it
is possible to connect using several connections simultaneously, but
only one of them can be active at a time. Any operations performed with
the application will have effect on the framework pointed by the active
connection exclusively (and if any connection is active, a error message will be shown that invite you to activate one).
The next image shows the new connection formulary for tid-jma4o
connections. The properties will be different for each type of
connection:

And finally the view of a connection already created:

Framework
Information about the framework and the working environment
can be
found in the framework entry on the main menu, which shows the next
view:

Bundles
Using the bundles facility, it is possible to start, stop,
update
and uninstall any bundle exported in the framework, or install new
ones, among other possibilities:

Each row of the table above displays diverse information about
each
bundle installed in the framework, and contains links to de detailed
bundle information view and its manifest, as well as a button to
perform a refresh operation to all of the bundle’s packages,
redirecting the user to the packages view. This is the bundle details
screen:
In addition to the information displayed, this view contains 4
butttons, placed under the location field, that can be clicked by the
user to update, start, stop and uninstall the bundle, from left to
right. The update button presents a new input dialog to let the user
specify a location from which to update. It defaults to the
bundle’s installation location.
Services
The service view allows the listing of the services registered
by the bundles installed in the framework:
Each row contains the service identifier, a link to the
registering
bundle’s detail screen, and a link to the service’s
detailed information view:
Package Admin
The package admin presents information about the packages
exported by the bundles installed on the framework:

Each row of the table above corresponds to a package. The rightmost
link presents the bundle detail screen for the bundle exporting the
package which name is presented at the leftmost part of the table.
Clicking on these names, the user will access the package detail view:
In this view extended information about the package is displayed,
including links to the bundle detail screen of all bundles installed in
the system that import the actual package, as well as of the exporting
bundle.
Start Level
The start level and initial start level of the framework, as
well as
each bundle’s start level can be specified through this view:

Permission
Admin
The functionality of OSGi’s permission admin service
is mapped to the view accessed by the menu item with the same name:
The first table displays information about locations with
currently
assigned permissions, as well as the default permission, while the
second lets the user introduce permissions for a new location. The
details view of each location is shown clicking of the appropriate
row’s button, and allows the removal of existing permissions
and
the creation of new ones for the current location:
Log
The OSGi framework releases logs, all of which are captured by the OSGi manager and displayed in this view:
Configuration
Admin
The Configuration Admin menu item provides access to the
following view:

Single configurations
The first table controls the single configurations, while the second
refers to the configuration factories. In the configurations table, it
is possible to remove an existing configuration, duplicate an existing
one, create a new one or access a configuration’s fields.
When
creating a new configuration, as well as when duplicating an existing
one, a new PID needs to be introduced. The only difference is that when
duplicating, all the configuration’s properties are filled
with
the original’s values, while in the case of the creation of a
new
one these properties are left empty. To watch and modify those the user
can click on the field of the table with the configuration’s
PID,
a link to the details view:
Here new properties can be specified for every configuration. Each
property is made up of a key and a value. This value can be of the
following types, according to the OSGi specification:
- Simple serializable type: String, Integer, Long, Float,
Double, Byte, Short, Character or Boolean.
- An array of any simple serializable type: String[],
Integer[]…
- An array of any primitive type: int[], char[], long[],
short[], byte[], boolean[], double[] or float[].
- A vector of any simple serializable type. Note that while
all of
an array’s members are of the same type, a vector is a
collection
of elements that don’t have to be necessary of the same type.
Depending of the property value’s type, a different view is
shown
when the Change button is clicked. In the case of a simple type, no
view is displayed, and the value is set to that specified in the input
box to the left of the button. When the value of the property is of the
type array of whatever other simple type (serializable or primitives),
the view on the right is shown:
Here, the Change button sets the value of the array element to that
specified in the corresponding input box, and when a new element is
created it take the value specified in the blank text field at the
bottom of the table, of the same type as the rest of the array.
When the value of the property is java.util.Vector, the next view is
displayed:
In this case, the new elements created with the new button can be of
any simple serializable type (neither primitives nor complex types),
which has to be specified at the sliding list to the left of the value
input box.
Configuration factories
In the configurations factory table, located under the single
configurations table in the main configuration admin screen, it is
possible to remove, and modify existing configuration factories, and
create new one. Removing a configuration factory implies removing all
of its simple configurations. When creating a new configuration factory
a new factoryPID needs to be specified. The new factory is created with
a new single configuration named after the factory configuration, with
a numeric suffix referring its birth order. For instance, if a factory
called “newFactory” is created, it will contain a
configuration named newFactory.0.

When more configurations are added to the current factory
configuration, they will follow the same naming pattern, so the next
time the new button is pressed, a new configuration will be created
with the name “newFactory.1”, and so on.
Configurations
belonging to a configuration factory can also be duplicated. In this
case, however, it will not be necessary to specify a PID for the new
configuration, the new duplicated configuration will take the name that
a new configuration created in the same moment would have. The
configuration PID displayed in the table above is also a link to a
configuration details screen identical to that of a single
configuration.