cicsdev / cics-event-consumer

Java™ EE 7 web application that consumes events produced by CICS® TS event processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cics-event-consumer

cics-event-consumer is a Java EE 7 web application that consumes events produced by CICS Transaction Server. Events are produced as a result of a CICS application event, a CICS system event, or a CICS policy event action. The application can also be called directly using the CICS LINK or START command.

cics-event-consumer can be called:

The received event, channel, or commarea can be formatted and:

The application was originally released as the IBM CA1Y: Send email from CICS Transaction Server for z/OS and referred to here as CA1Y for short.

Requirements

To install or make changes to the application:

To run the application:

Installation

  1. Define, install and enable a CICS TRANSACTION resource with attributes NAME(CA1Y), PROGRAM(CA1Y), TASKDATALOC(ANY).

  2. Update the Liberty server configuration file server.xml to include the following features:

    <feature>cicsts:link-1.0</feature>
    <feature>jaxrs-2.0</feature>
    <feature>jaxb-2.2</feature>
    <feature>javaMail-1.5</feature>
  3. Either :

    • Clone this repository using git,
  • or
    • download the repository cics-event-consumer-main.zip and expand it.
    • Then, in CICS Explorer, select FileImport...Existing Projects into WorkspaceSelect root directoryBrowse and select the repository projects directory. Select all the projects, then Copy projects into workspace, then Finish.
  1. If your JVMSERVER resource name is not DFH$WLP, expand project com.ibm.cics.ca1y.web.cicsbundle, then edit com.ibm.cics.ca1y.web.warbundle, and update the value for jvmserver.
  2. Export the com.ibm.cics.ca1y.web.cicsbundle CICS Bundle project using the wizard Export Bundle Project to z/OS UNIX File System... to a directory on zFS such as /usr/lpp/ca1y/com.ibm.cics.ca1y.web.cicsbundle_1.8.0
  3. Define, install and enable the CICS BUNDLE resource with attributes:
    • NAME(CA1Y),
    • BUNDLEDIR(/usr/lpp/ca1y/com.ibm.cics.ca1y.web.cicsbundle_1.8.0)

Alternatively you can export the com.ibm.cics.ca1y.web project as a WAR file and install it into the Liberty JVM server using the dropins directory, or add an application entry in server.xml as described in topic Deploying web applications directly to a Liberty JVM server.

Usage

See the documentation and the examples.

Motivation

This project was started in 2012 as to demonstrate how to write a CICS event adapter, and how the many APIs available in Java could be used to consume and process the events. Several customers raised the requirement to send an email from a CICS application asynchronously to the task, and the combination of event processing and the JavaMail API lead to the project being made available. As detailed in the CHANGELOG, the project evolved to meet new requirements - some motivated by customer need, and others to learn about Java, CICS, and JZOS APIs. It was moved to GitHub and the license changed to encourage community engagement.

License

This project is licensed under Apache License Version 2.0.

About

Java™ EE 7 web application that consumes events produced by CICS® TS event processing

License:Apache License 2.0


Languages

Language:Java 100.0%