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. Updating an asset to use a new bundle version might require bundle downloads. You cannot update an asset until bundle downloads are complete from any previous update.
Similarly,
the composition unit that contains the asset is not updated automatically,
and you do not have to update the composition unit every time you
update the asset. The composition unit also contains configuration information for running the bundles in a business-level application, and when you make bundle changes to the asset you might also have to make configuration changes to the composition unit.
No changes are made to the business-level application until you update the composition unit to the latest deployment and save the changes. If the business-level application is running, the bundle and configuration updates are applied immediately.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.
- Create an updated version of a bundle or composite
bundle
that is specified in your EBA asset.
See Developing an OSGi application and Developing a composite bundle.
- Add the
updated bundle or composite bundle to a bundle
repository.
An updated bundle or composite bundle is
installed in a bundle repository then pulled into the asset by reference. 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.
- Check the
bundle download status of the asset.
This status is either "Bundles downloading...", "Bundle downloads are complete", or "No bundles downloads are required". If the asset has previously been updated, the bundle downloads for the previous update must have completed.
- Update bundle or composite bundle versions for the asset.
Use either of the following methods:
- Optional: Check the update status of the
composition unit.
If you plan to update the composition unit at this time, check the update status of the associated OSGi composition unit. This status
is one of the following values:
- Using latest OSGi application deployment.
- New OSGi application deployment not yet available because it requires
bundles that are still downloading.
- New OSGi application deployment available.
- New OSGi application deployment cannot be applied because bundle
downloads have failed.
- Optional: Update the composition unit to the latest deployment.
If a new version of the EBA asset is available, and all bundle downloads are complete, you can update the OSGi composition unit so that the business-level application uses the newer configuration. You do not have to update the composition unit every time you update the asset or add a composite bundle extension.
If any of the updates contain configuration options, you update the configuration information. You can also take the opportunity to make additional, non-essential configuration changes.
Use either
of the following methods:
When you save the changes to the composition unit, the associated business-level application is updated to use the new configuration. If the business-level application is running, the bundle and configuration updates are applied immediately.
If possible (that is, depending on the nature of the updates) the system applies the updates without restarting the application. If you update a bundle that provides only OSGi services to the rest of the application, then only that bundle is restarted. If you update a bundle that provides one or more packages to other bundles, then those bundles and any bundles to which they provide packages are restarted. If, however, a new package or service dependency is added, or an existing package or service dependency is removed, then the application is restarted; a newly added package and service can come from a newly-provisioned bundle, or from a bundle that has already been provisioned.