Controlling which version of an OSGi program is linked to
Applies to 6.2 and later.CICS® programs can target Java classes that are contained within
OSGi bundles. The JVMCLASS program attribute controls which class is targeted and provides options
for controlling which OSGi bundle the class is loaded from.
Optional: To target a class in a range of bundle versions, define the
JVMCLASS attribute in the form:
servicename;version=minVersion,maxVersion
or
servicename;minVersion=minVersion;maxVersion=maxVersion.
minVersion
The minimum version to target, inclusive of the defined version, such that
minVersion≤targetVersion. To make
the maximum version exclusive of the defined version, prefix minVersion with the
> character.
maxVersion
The maximum version to target, inclusive of the defined version, such that
maxVersion≥targetVersion. To make
the maximum version exclusive of the defined version, prefix maxVersion with the
< character.
Results
Java code in an OSGi bundle can be run at a specific version of that bundle.
Example
Figure 1. CICS program JOMCPRV1, targeting the
main method of the class com.example.App, in the OSGi bundle with
a version of 1.0.0