Sometimes it is difficult to determine whether an i5/OS™ PASE environment already exists. Using the optional environment variable QIBM_JAVA_PASE_ALLOW_PREV in combination with QIBM_JAVA_PASE_STARTUP enables the JVM to determine whether to use the current i5/OS PASE environment (if one exists) or start a new i5/OS PASE environment.
To use these two environment variables in combination, set them to the following values:
For example, an application that optionally starts an i5/OS PASE environment calls the program that starts the JVM. In this case, by using the previous settings, the program is able to use the current i5/OS PASE environment, if one exists, or start a new i5/OS PASE environment.
The following table identifies any i5/OS PASE environments that result from the various combinations of i5/OS PASE environment and definitions of QIBM_JAVA_PASE_STARTUP and QIBM_JAVA_PASE_ALLOW_PREV:
Starting environment | Resulting behavior | ||
---|---|---|---|
i5/OS PASE environment | QIBM_JAVA _PASE_STARTUP | QIBM_JAVA_PASE _ALLOW_PREV | JVM i5/OS PASE Startup |
None | Not defined | Not defined* | No i5/OS PASE environment |
None | Not defined | Defined '1' | No i5/OS PASE environment |
None | Defined startX | Not defined* | Use startX |
None | Defined startX | Defined '1' | Use startX |
Started | Not defined | Not defined* | Use existing i5/OS PASE environment |
Started | Not defined | Defined '1' | Use existing i5/OS PASE environment |
Started | Defined startX | Not defined* | Not allowed: JVM error during startup |
Started | Defined startX | Defined '1' | Use existing i5/OS PASE environment |
* "Not defined" means that QIBM_JAVA_PASE_ALLOW_PREV is either not included or has a value other than 1.
The last two rows in the previous table indicate situations where it is useful to set QIBM_JAVA_PASE_ALLOW_PREV. The JVM checks QIBM_JAVA_PASE_ALLOW_PREV when an i5/OS PASE environment already exists and you have defined QIBM_JAVA_PASE_STARTUP. Otherwise, the JVM ignores QIBM_JAVA_PASE_ALLOW_PREV.
The QIBM_JAVA_PASE_ALLOW_PREV and QIBM_JAVA_PASE_CHILD_STARTUP environment variables are independent of each other.