Network Deployment (Distributed operating systems), v8.0 > End-to-end paths > OSGi applications


Extend a deployed OSGi application

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


Before you begin

To add or remove composite bundle extensions for a deployed application, use this task.

To update bundles and composite bundles specified in an EBA asset, see Update bundle versions in a deployed OSGi application.


About this task

After you import the enterprise bundle archive (EBA) file for your OSGi application as an asset, you can update versions of existing bundles but you cannot add extra bundles to the asset. However, after we have added the asset as a composition unit to a business-level application, you 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 you add composite bundle extensions you might also need 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.


Procedure

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

    • 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, 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. We 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. Messages relating to any restart operations are written to the WAS SystemOut.log file.


Subtopics

Related concepts:

About OSGi Applications
Composite bundles

Related tasks:

Secure OSGi Applications

Related reference:

OSGi Applications: Troubleshooting tips

Related information:

Add extensions [Collection]
Add extensions [Settings]
Manage extensions for this composition unit [Collection]
Manage extensions for this composition unit [Settings]
Task topic Feedback
Copyright IBM Corporation 2009, 2011. All Rights Reserved.
This information center is powered by Eclipse technology.

+

Search Tips   |   Advanced Search