Like coffee energizes workers, the Java programming language can invigorate enterprises by ensuring employees can easily modernize their organizations' applications, bolstering their resiliency and updating them as marketplace needs change. Phil Wakelin, software engineer at IBM who spoke during the “Don’t Let Java Out of Memory Error Get Your CICS Down” and “Java Update for CICS TS 5.6” sessions at SHARE Virtual Experience 2021, says that organizations upgrading CICS TS to version v5.6 can do so without recompiling Java applications, while still providing a wide range of security and resilience improvements out of the box and enabling access to the latest Java APIs and frameworks.
CICS Supports for Java
With CICS TS v5.5, developers can use the Java EE 8, Jakarta EE 8, or Spring Boot frameworks within the embedded Liberty server, all of which offer a wide range of modern APIs to support rapid enablement of web applications following the latest industry standards. In addition, the scalability and resilience of using Java in CICS has been enhanced by enabling multiple secure Liberty servers in a single CICS region, says Wakelin. Security capabilities can be enhanced by supporting JSON Web Tokens (JWT) and OpenID connect that enable the integration of CICS applications with third-party authentication solutions across an enterprise.
CICS TS v5.6 — the latest version of CICS TS — continues to support the same Java and Liberty versions as supported in prior releases, says Wakelin. All CICS TS releases offer a set of new functions for Java developers, including support for Maven and Gradle build tools that help resolve dependencies on CICS Java APIs that use Maven Central. He adds that these tools are supported across most integrated development environments, which gives developers the choice to use the tools that are most productive for them.
Wakelin points out that CICS TS v5.6 adds the new JCICSX API to facilitate remote testing and development and the CICS bundle deployment endpoint tooling to support automation of the build and deployment of CICS bundles and Java applications. In addition, CICS TS v5.6 also provides a set of new SPI commands to enable automated life-cycling of Java applications, the pausing and resuming of Liberty servers, and the capture of Java dumps and diagnostic information. Moreover, he says that built-in monitoring of 24- and 31-bit MVS private area free storage within a CICS region provides early warning of potential storage failures and improves the resilience of both CICS Java applications and other third-party CICS components.
Java on z/OS and Application Modernization
The Java runtime on z/OS provides the same features as the IBM SDK for Java on all other platforms. However, Wakelin says that Java on z/OS had deep IBM Z hardware exploitation, including the use of zIIP processors to reduce software charging, built-in support for data compression using the on-chip zEDC, and exploitation of more than 30 new z15 instructions, including Data Access Acceleration (DAA), String, array copy, and cryptographic APIs. When using Java in CICS, integration with the CICS runtime also is provided to ensure that Java applications can fully exploit the CICS transaction and security contexts available to all CICS applications.
Wakelin says successful customers will modernize their applications step-by-step, starting with well-encapsulated components, which can be invoked using the CICS LINK command, and choosing threadsafe CICS API calls. One example is the data access layer that calls Db2, or a web service component that receives REST API calls over HTTP and then calls existing CICS programs. Many successful Java modernization projects, he explains, were implemented by creating a Java web service interface to an existing CICS back-end program using either the Java EE or Spring Boot frameworks.
CICS and Java Virtual Machine
The Java Virtual Machine (JVM) support in CICS, Wakelin explains, is fully integrated into the CICS runtime through the support of the CICS JVM server runtime, which controls the lifecycle of the underlying JVM. The JCICS API package makes it simple to call just about any EXEC CICS API command from a Java application, and a set of SPI commands is provided to manage the JVM server enabling the JVM to start or stop, pause or resume Liberty endpoints and take diagnostic dumps. "The JVM server also provides support for CICS statistics and monitoring, giving the key metrics needed to analyze the health and performance of each JVM server," he says. "These can be viewed using either the CICS batch utilities, CICS Explorer, or through add-on tools, such as CICS Performance Analyzer."
In addition, OMEGAMON for JVM and other third-party monitoring tools can provide additional deep dive capability to analyze the JVM during runtime operations. Further, specialist tools also are available within the IBM SDK, including the IBM Health Center for Java and verbose garbage collection for low-level problem determination.
Moreover, Wakelin says that organizations should optimize the use of third-party frameworks like Spring Boot to ensure they are efficient and so that middleware restarts can proceed in a repeatable and timely manner. He advises implementing batching of JVM starts (or CICS regions in which they run) to prevent contention and to configure a Java shared class cache to optimize startup processing. Wakelin cautions that modernizing applications should go hand-in-hand with modernizing the DevOps pipeline because it will help an enterprise drive a faster and more robust automated deployment of applications. He adds that companies will want to modernize in a gradual manner so that the deployment infrastructure is resilient, can scale to future needs, and continues to perform at its peak ability for years to come.