Phasing in an OSGi bundle with CICS resource changes

Use this update method to phase in a new version of an OSGi bundle when service outages cannot be tolerated during the update process. New CICS® resources are created during the update.

Before you begin

A CICS bundle that contains the new version of an OSGi bundle is already defined and exported to zFS. The new version of the OSGi bundle must have a higher version specified in the OSGi bundle manifest than the version that is currently installed in the OSGi framework. You can have both OSGi bundles running in the framework at the same time.

Procedure

To phase in a new version of an OSGi bundle in an OSGi JVM server, use the following steps.

  1. In the Bundle Definitions view in CICS Explorer®, right-click anywhere and click New to create a BUNDLE resource to pick up the new CICS bundle project on zFS.
  2. In the Bundle Definitions view in CICS Explorer, right-click the BUNDLE resource that you created in the previous step and click Install. Select the install target, then click OK to install the OSGi bundles and services in the CICS bundle into the OSGi framework.
  3. Check the status of the OSGi bundles in the OSGi Bundles view in CICS Explorer. Two versions of the OSGi bundle are listed with a state of active.
  4. In the OSGi Services view in CICS Explorer, check the OSGi services that are implemented by both versions of the OSGi bundle are all in the active state. The OSGi services that reference the OSGi bundle with the highest semantic version are used for any new service invocations.

Results

The updated OSGi bundle is available in the OSGi framework along with the old version of the OSGi bundle.

The new version of the OSGi bundle is used for all new service requests. Existing requests continue to use the old version.

What to do next

When you are satisfied that the new version of the OSGi service is working well, use the following steps to remove the old version from the OSGi framework:

  1. Disable the BUNDLE resource that points to the old version of the OSGi bundle. In the Bundles view in CICS Explorer, right-click the old BUNDLE, click Disable, then click OK. The old version of any services that are implemented by the OSGi bundle are removed from the OSGi framework; only the new versions of the services are now listed in the OSGi Services view. In the OSGi Bundles view, the old OSGi bundle state is now in resolved.
  2. Discard the BUNDLE resource that points to the old version of the OSGi bundle. In the Bundles view in CICS Explorer, right-click the old BUNDLE, click Discard, then click OK. In the OSGi Bundles view, the OSGi bundle from the OSGi framework is removed, and only the new version of the OSGi bundle is listed.

To ensure that the new version of the OSGi bundle is installed if there is a cold start of a CICS region, make sure that you update any CICS group lists (GRPLIST system initialization parameter) that reference the CSD groups that contain the BUNDLE definition for the old version, to reference the CSD groups that contain the new BUNDLE definition that you created in Step 1 of the procedure.

If you want to restore the old version of the OSGi bundle, use the previous two steps to disable and discard the BUNDLE resource that points at the new version of the OSGi bundle. The old version of the service is listed in the OSGi Services view in CICS Explorer, and it is used for any new service invocations.



phase_in_osgi_bundle_cics.html | Timestamp icon Last updated: Sunday, 4 June 2017