Provisioning for OSGi applications

When an OSGi application is installed as an enterprise bundle archive (EBA) asset, provisioning ensures that all the OSGi bundles that are required for the application to run are available. An OSGi application can use bundles from remote repositories, bundles from the local repository, and bundles that are included in its EBA file.

As an OSGi application becomes formalized, the developer creates an application manifest that lists all the bundles that the application uses directly. Of this set of bundles, the developer might choose to package up only newly-created bundles in the EBA file, expecting other bundles to be provisioned from the configured local and remote repositories.

OSGi bundles can be stored in the following locations:
Provisioning gets the following types of bundle from a repository:

Provisioning occurs when the OSGi application is installed as an EBA asset, or when an existing EBA asset is updated. The EBA asset is resolved; that is, the locations of the constituent application bundles, at appropriate versions, are determined by using the contents of the EBA file, the local repository, and the specified set of external bundle repositories. Provisioning also checks for dependencies and locates them from the relevant bundle repositories. Dependencies include imported packages, required bundles, services, and persistence providers. The provisioning process detects service dependencies by checking the <service> and <reference> elements in the Blueprint XML files for a bundle. Bundles are scanned for Blueprint XML files when the bundles are added to the local bundle repository, or when they are provided in an EBA file. If your application code makes direct programmatic use of OSGi services, provisioning does not detect those service dependencies unless they are also specified in the Blueprint XML files.

If a bundle is referenced in the application manifest with a range of possible versions, provisioning locates a bundle at a version in that range. If more than one version of a specified bundle is available, the latest version in the specified range is selected, unless selecting a later version prevents the application from resolving.

If a required package or service is available at the same version from both a bundle and a composite bundle, the provisioning process selects the package or service from the composite bundle.

If the constituent application bundles resolve successfully, a deployment manifest is generated. This manifest lists all the bundles that the application requires, with the actual version of each bundle that the OSGi application will use. The deployment manifest includes all the bundles that are declared in the application manifest, and also any dependent bundles.
Note: If the provisioning process establishes that a bundle that is listed in the Use-Bundle header in the application manifest does not provide any packages to bundles listed in the Deployed-Content header, that use bundle is not listed in the Deployed-UseBundle header in the deployment manifest. Also, unless that use bundle is required for another purpose, it is not listed in the Provision-Bundle header in the deployment manifest.

If the constituent application bundles resolve successfully, when the configuration is saved, all the referenced bundles and dependency bundles are downloaded from either the internal bundle repository or external bundle repositories. The resolved bundles are copied to the appropriate location on the local disk.

When the download is complete, you can add the asset to a business-level application. If you are updating an asset that has already been added to a business-level application, you must restart the business-level application for the updates to take effect.

If any constituent bundles cannot be located, the EBA asset does not resolve. Installation cannot proceed and you cannot add the asset to a business-level application. Messages show which bundles cannot be located. Before you can continue with the installation, you must make the relevant bundle available in one of the following ways:

Icon that indicates the topic type Concept topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Saturday, 20 October 2012
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v700osgijpa&product=was-nd-mp&topic=ca_provis

Copyright IBM Corporation 2009, 2012.
This information center is powered by Eclipse technology. (http://www.eclipse.org)