Updating bundle versions for an EBA asset

After you import your OSGi application as an asset, newer versions of the bundles or composite bundles that the asset uses might become available. You can configure the deployed asset to use an updated version of any bundle or composite bundle that is used by the asset. You can choose to use a specific bundle version, or to pull in the latest compatible version.

Before you begin

You can update bundle and composite bundle versions for an EBA asset by using the administrative console as described in this topic, or by using wsadmin commands as described in Updating bundle versions for an EBA asset using the editAsset command.

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. 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. The asset is not updated automatically when new bundle versions become available; it is up to you to decide if and when to update the asset.

For each bundle or composite bundle specified by your EBA asset you can select either of the following options:
  • Use a specific available bundle version.
  • Use any version. In this case, the latest available version that is compatible with your selections for other bundles is used.

After you make your selections for this asset, the system tries to resolve the changes you have requested, and shows you the results. When you have selected a working configuration, you can commit your selections and the bundle version updates for the asset are applied.

You cannot update bundles that are provisioned by the runtime environment.

Note: When an EBA asset is updated, the update does not automatically affect the running business-level application. To update the running application, you update the composition unit of the business-level application that contains the asset.
For users who are moving from a previous version: In the WebSphere® Application Server Version 7 Feature Pack for OSGi Applications and Java™ Persistence API 2.0, bundle changes to the asset are applied by restarting the business-level application, rather than by updating the composition unit. The current approach means that many bundle changes can be applied in place, without restarting the running business-level application.

Procedure

  1. Start the administrative console.
  2. Navigate to Applications > Application Types > Assets > asset_name.

    The Asset settings panel is displayed.

  3. Check the current bundle download status for all bundles and composite bundles for this asset.

    If the asset has previously been updated, the bundle downloads for the previous update must have completed.

    The current bundle download status for all bundles and composite bundles for this asset is displayed in the EBA Dependencies section. This status is either Bundles downloading..., Bundle downloads are complete, or No bundles downloads are required.

    If the bundle downloads for any previous update are complete, the option to update bundle versions is available under the Additional Properties section.

  4. Click [Additional Properties] Update bundle versions in this application.
    The Update bundle versions in this application [Settings] panel is displayed. This panel contains a tabular overview of the bundles and composite bundles currently deployed in the asset. Application bundles are listed separately from use bundles.
  5. Choose the update bundle version preference for each bundle in this application.
    In the table, you can select the update preference for each bundle from a list. You can choose either of the following options:
    • Choose a specific available bundle version. For example, 1.0.0.
    • Choose No preference. If you select this option, the latest available version that is compatible with your other bundle selections is used.
  6. Click Preview.
    A similar table is displayed in the Preview bundle versions update [Settings] panel, showing the result of the proposed changes to the bundle versions in this application. If the changes resolve successfully, the following message is displayed: The selected bundle versions can be resolved, so you can now create a new deployment with the proposed bundle versions. The new deployment will not affect any composition units for this asset until the composition units are updated to use the new deployment. Otherwise, the message displayed is The selected versions cannot be resolved, so you cannot create a new deployment with the proposed bundle versions.
  7. Optional: If the changes are not all resolved successfully, click Cancel to return to the Update bundle versions in this application [Settings] panel, then select a different update preference for each bundle that could not be resolved.
  8. When you have selected a working configuration, click Create.
    The bundle and composite bundle version updates for the asset are applied.
  9. Save your changes to the configuration repository.
    The bundle updates are downloaded.

What to do next

If you plan to update the composition unit at this time, check that all bundle downloads are complete. See Checking the update status of an OSGi composition unit.