+

Search Tips   |   Advanced Search

Extending a deployed OSGi application

A composite bundle groups shared bundles together into aggregates. By adding one or more composite bundles to the composition unit, we can extend a business-level application without having to redevelop and redeploy the underlying OSGi application.

To add or remove composite bundle extensions for a deployed application, use this task. To update bundles and composite bundles that are specified in an EBA asset, see Update bundle versions in a deployed OSGi application.

After you import the enterprise bundle archive (EBA) file for the OSGi application as an asset, we can update versions of existing bundles but we cannot add extra bundles to the asset. However, after we have added the asset as a composition unit to a business-level application, we can extend the business-level application by adding one or more composite bundles to the composition unit. The composition unit also contains configuration information for running the bundles in a business-level application, and when we add composite bundle extensions 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.

  1. Develop the composite bundle.

    You use OSGi application tooling to develop the bundles and create the composite bundle manifest. You package the directly-contained bundles and the composite bundle manifest as a compressed archive file with a .cba file extension, then add the .cba file and any referenced bundles to the internal bundle repository.

  2. Add the composite bundle as an extension to the composition unit.

    Use either of the following methods:

  3. Optional: Check the update status of the composition unit.

    If we 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:

    • Use 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.

  4. Optional: Update the composition unit to the latest deployment.

    When all bundle downloads are complete, we 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 we update a bundle that provides only OSGi services to the rest of the application, then only that bundle is restarted. If we 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.


Subtopics


Related concepts

  • Composite bundles


    Related tasks

  • Debugging bundles at run time


    Related information:

  • Add extensions [Collection]
  • Add extensions [Settings]
  • Extensions for this composition unit [Collection]
  • Extensions for this composition unit [Settings]