Moving bundles from an OSGi application to a bundle repository

You can change the configuration of an enterprise OSGi application so that bundles and composite bundles that were directly contained in the enterprise bundle archive (EBA) file are instead pulled in by reference and provisioned from a repository.

Before you begin

After you import your application as an asset, you can no longer change the direct contents of the asset.To update bundles and composite bundles that are specified in an asset, you add the updated versions to a repository then apply the updates to the asset. See Updating bundle versions in a deployed OSGi application.

About this task

When you first create an OSGi application, each bundle and composite bundle in the application is either directly contained in the EBA file or pulled in by reference. Before you deploy the application, you can move bundles or composite bundles from the EBA file to a bundle repository. You might want to do this to decrease the size of the EBA file, or so that bundles can be shared between multiple applications rather than each application deploying its own copy of a common library.

Composite bundles, and any bundles that are used by composite bundles, can be moved to the internal bundle repository or to an external repository that can process composite bundles. You can move the whole composite bundle to the repository, or move one or more of the bundles that the composite bundle uses to the repository. For more information, see Composite bundles.

Procedure

  1. Use your preferred development tool to remove the bundle or composite bundle from the EBA file.

    See Developing and deploying an OSGi application.

  2. Ensure that the EBA file has an application manifest and that the bundle or composite bundle is listed in the Application-Content header of the application manifest.

    See Enterprise bundle archives.

  3. Install the bundle that you removed into a bundle repository.

    Composite bundles, and bundles referenced by composite bundles, are installed in the internal bundle repository or in an external repository that can process composite bundles. See Administering bundle repositories.

What to do next

You can deploy your OSGi application. See Deploying an OSGi application as a business-level application.


Icon that indicates the type of topic Task topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Tuesday, 19 June 2012
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-mp&topic=ta_move_bundle
File name: ta_move_bundle.html