The Open Services Gateway initiative (OSGi) model library
is an information model for OSGi bundles. You can use the model library
to manage bundles and their dependencies and make them available in
other applications through a bundles repository.
The OSGi model library is included in IBM® Rational® Asset Manager.
You can use the Bundle, Service, and Package asset types, OSGi policy,
and configuration mapping file to work with other products as an OSGi
bundle repository (OBR).
With the model library, you can search for and provision approved
bundles in applications such as IBM WebSphere® Application Server
or IBM Rational Application Developer. When OSGi
bundle assets are visible from a bundle repository URL servlet, you
can use those assets for the following purposes:
- To search for packages and bundles by name, version range, or
properties
- To download a bundle that is associated with a specific package
or service
You can configure the servlet as an OBR in WebSphere Application Server versions 7
and 8.
To enable the OSGi model library, you must be a repository administrator. For more information, see Enabling the OSGi model library.
OSGi model library features
The OSGi model library includes
the following features:
- Asset types
- The asset types in the OSGi model library include OSGiBundle,
OSGiPackage, OSGiService, and OSGi Mapping Configuration.
- Bundle
- Bundle assets contain content
and follow a lifecycle for approval. Asset consumers can download
bundle content for installation. The manifest file specifies the content
of the bundle, such as the packages and services in the bundle.
- Package
- Package
assets contain attributes that identify where a package relates to
bundles. The Package asset type is a generated, read-only asset. This
asset type provides information about packages and enables specific
search capabilities.
- Service
- Service assets contain
attributes that describe a service. The Service asset type is a generated,
read-only asset. This asset type provides information about services
and enables specific search capabilities.
- Mapping Configuration
- An OSGi mapping file maps a bundle manifest header to attributes
and relationships in Rational Asset
Manager. You can use the default mapping configuration file or provide
a different file. To access the file, click . You can download the file,
modify it, and upload a new file for a new mapping.
The OBR is
available at http://<hostname>:<port>/<context-root>/BundleRepository.
This URL is a servlet that generates a .xml file.
Rational Asset Manager generates asset attributes
that correspond to the information in the bundle manifest file and
creates an asset for each exported package. Service assets are created
for each service that represents a blue print service in an OSGi bundle.
For
more information about bundle repositories, see the Apache Felix OSGi Bundle Repository (OBR).
- Relationship types
- The relationship types in the OSGi model library include Exports,
Exported By, Provides, and Provided By. You can use these relationship
types to specify dependencies. Bundle and package assets are related
through the Exports and Exported By relationships.
- OSGi policy
- The OSGi policy provides default mapping for bundles to assets.
You can configure the policy for additional attributes and relationships.
- Configuration mapping file
- The
OSGi configuration mapping file provides default mapping for bundle
manifest header files to asset attributes and relationships. You can
use the default OSGi configuration mapping file or provide a different
one on the page. From the OSGi Configuration section,
you can download the current mapping file, make changes to it, upload
a new mapping, or restore the default mapping.
- OSGi category schema
- The OSGi category schema contains categories for Package and Bundle
types. You can use the included Kind categories to organize OSGi asset
types.
- Included, preconfigured lifecycle
- Once you enable the OSGi model library, you can use or modify
the preconfigured lifecycle for the included asset types so that you
can maintain and enforce the information model.
- Tools to integrate with OSGi bundle repositories
- With the sample mapping configuration file, you can map bundle,
service, and package assets to a bundle repository. The bundle repository
can be used in other products, such as WebSphere Application Server and Rational Application Developer.