CICS TS V5.4 now supports Java Enterprise Edition 7 (Java EE) Full Platform. This platform enables developers to write cross-platform applications and host them in CICS, using one of the most popular and community-driven programming languages.

CICS has been at the forefront of Java on the mainframe since the late 1990s. Mainframe hardware has evolved and matured alongside the Java community, language, APIs, and frameworks. The important milestone of providing Java EE 7 capability in CICS is a direct result of this evolution. Developers can now leverage the full range of Java EE 7 features. This includes Enterprise JavaBeans (EJBs) to write business logic, JDBC to access DB2 data, and JMS to access MQ messages. Significantly, CICS programs, data, and services are also accessible from Java EE applications using the JCICS API.

Java EE applications are typically started through network interactions such as REST APIs, but CICS also allows them to be started from other languages. The respective commands are LINK, START, and RUN (from the new asynchronous API). Overall this gives developers the freedom to choose the most suitable language for their task.

CICS TS V5.4 also includes enhancements to the management of JVM servers and associated CICS tasks. CICS is able to remove disruptive tasks from the JVM server using the purge option, and can quiesce associated threads and tasks in a more orderly sequence when disabling the JVMSERVER.

What’s the difference between Java SE and Java EE?

Java Standard Edition (Java SE) platform provides the core Java language and API, including basic types and objects, base libraries, tools and utilities, and of course a Java Virtual Machine (JVM). Java SE for the z/OS operating system is provided by the IBM SDK for z/OS. It has passed independent Java test suites to ensure it provides applications with hardware and operating system independence, and carries the Java logo.

The Java EE platform is built on top of the Java SE platform. It provides the APIs and runtime environment for large-scale, multi-tiered, scalable, reliable, and secure network applications. Supported applications include EJBs, and Java batch applications. Supported features include Servlets, JavaServer Pages, REST and SOAP web services, XML, e-mail, messaging, and transactions.

The Java EE 7 runtime in CICS is provided by WebSphere Application Server Liberty for z/OS and has been certified as compliant to the Java EE 7 specifications. Liberty is scalable, reliable, and secure. It can be configured to load only the specific features your applications need that in turn keeps the runtime as simple and lightweight as possible.

The diagram shows that Java EE offers many useful features for writing enterprise-class applications. For applications that have more basic needs, or for developers who want to use other frameworks, Java SE might be all that is required. CICS gives you the choice.

Running

CICS provides a JVMSERVER resource to define and control the environment under which the JVM operates. Typically when the JVMSERVER resource is enabled, a JVM containing an OSGi framework is installed and started. Amongst many other benefits, OSGi allows your Java applications to be installed and removed without requiring a full JVM restart. This setup is referred to as an OSGi JVM server in the CICS documentation.

The JVMSERVER can also be configured to run Liberty within that OSGi framework to provide the Java EE runtime and is known as a Liberty JVM server. Liberty is included and maintained with the CICS installation.

The full set of supported Java EE 7 features, along with relevant restrictions of a Liberty JVM server are outlined in the topic Liberty features.

Developing

There are several development environments to choose from, but the CICS team suggest using Eclipse. You can install the package Eclipse IDE for Java EE Developers and add CICS Explorer 5.4 SDK in minutes. This gives you on environment within which to write applications, export them to zFS, and deploy them to CICS. You can also use the Eclipse remote debug facilities, and IBM Health Center live as the application runs in CICS. Depending on the APIs your application uses, Liberty can be installed locally using the Eclipse support for Server Runtime Environments and run the application on your machine – all for free!

For developers who have a need to write mixed-language applications, IBM Developer for z Systems extends Eclipse to include a rich set of tools for COBOL, PL/I, HLASM, and C/C++ development.

Java applications can be packaged, built and deployed within CICS bundles using CICS tooling. This is a convenient path to take if you already have good CICS skills and procedures. Alternatively, if you currently package Java EE applications into WARs, EARs or EBAs you can continue to do so and deploy them by changing the Liberty configuration directly.

Feedback

CICS provides the opportunity to host Java EE 7 Full Platform applications in close proximity to data and services on the mainframe with good integration with existing data, services, and workloads. The CICS team are continuing to look at what is coming next for Java, and we’d love to hear about your experiences in the comments below.

Discover more

Join The Discussion

Your email address will not be published. Required fields are marked *