Skip to content

Commit 7f7810f

Browse files
committed
Updates to README.md
1 parent 8332b2b commit 7f7810f

File tree

1 file changed

+36
-28
lines changed

1 file changed

+36
-28
lines changed

README.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
# cics-eventprocessing-java
2+
23
Example code of how to use CICS event processing in the Java programming language
34

45
## Structure
6+
57
The project consists of two Maven modules:
68

7-
1. cics-eventprocessing-java-webapp - The Java source code for this example
8-
2. cics-eventprocessing-java-bundle - The bundle definition for this example
9+
1. cics-eventprocessing-java-webapp - the Java source code for this example
10+
2. cics-eventprocessing-java-bundle - the bundle definition for this example
911

1012
## Code Structure
11-
The code is built into a WAR file, which can be deployed to a Liberty JVM server as a web application.
1213

1314
There are two Java classes:
1415

15-
1. EventEmitter.java - A servlet which emits CICS events
16-
2. EventConsumer.java - Defines the program `EVNTCONS` which receives CICS events, see [Bundle Structure](#bundle_structure) for more details
16+
1. [`EventEmitter.java`](./cics-eventprocessing-java/cics-eventprocessing-java-webapp/src/main/java/com/ibm/cicsdev/eventprocessing/EventEmitter.java) - a servlet that emits CICS events
17+
2. [`EventConsumer.java`](./cics-eventprocessing-java/cics-eventprocessing-java-webapp/src/main/java/com/ibm/cicsdev/eventprocessing/EventConsumer.java) - the Java code to define the CICS program resource `EVNTCONS` and consume the CICS events
18+
19+
The code is built into a WAR file, packaged into a CICS bundle, and deployed to a Liberty JVM server as a web application.
1720

1821
## Bundle Structure
19-
The CICS bundle contains several elements
2022

21-
1. `EVNT` - A transaction which targets the `EVNTCONS` program
22-
2. `EVENTADAPTER` - An EP Adapter which starts the `EVNT` transaction
23-
3. `EVENT` - An Event Binding which targets the `EVENTADAPTER` adpater
24-
4. A WARBUNDLE containing the built Java WAR.
23+
The CICS bundle contains the following elements:
24+
25+
1. [`EVNT.transaction`](./cics-eventprocessing-java/cics-eventprocessing-java/cics-eventprocessing-java-bundle/src/main/bundleParts/EVNT.transaction) - transaction which targets the `EVNTCONS` program
26+
2. [`ACCOUNTADAPTER.epadapter`](./cics-eventprocessing-java/cics-eventprocessing-java/cics-eventprocessing-java-bundle/src/main/bundleParts/ACCOUNTADAPTER.epadapter) - event processing adapter which starts the `EVNT` transaction
27+
3. [`ACCOUNT.evbind`](./cics-eventprocessing-java/cics-eventprocessing-java/cics-eventprocessing-java-bundle/src/main/bundleParts/ACCOUNTADAPTER.epadapter) - event binding which targets the `EVENTADAPTER` adpater
28+
4. `WARBUNDLE` - Java WAR bundle is added when built
2529

2630
## Building
27-
There are several ways to build this project. We suggest you build with a build toolkit such as Gradle or Maven:
31+
32+
There are several ways to build this project. We suggest you build with a build toolkit such as Gradle or Maven.
2833

2934
### Building with Gradle
35+
3036
Run the following command from the `cics-eventprocessing-java` directory:
3137

3238
```sh
@@ -36,51 +42,53 @@ Run the following command from the `cics-eventprocessing-java` directory:
3642
This will compile the Java code, build a WAR file and package it and the EP adapter and Event binding into a CICS bundle as a ZIP file at `./cics-eventprocessing-java-bundle/build/distributions/cics-eventprocessing-java-bundle-0.0.1-SNAPSHOT.zip`
3743

3844
### Building with Maven
45+
3946
Run the following command from the `cics-eventprocessing-java` directory:
4047

4148
```sh
4249
mvn verify
4350
```
4451

45-
This will compile the Java code, build a WAR file and package it and the EP adapter and Event binding into a CICS bundle as a ZIP file at `.cics-eventprocessing-java-bundle/target/cics-eventprocessing-java-bundle-0.0.1-SNAPSHOT.zip`
52+
This will compile the Java code, build a WAR file and package it and the EP adapter and Event binding into a CICS bundle as a ZIP file at `./cics-eventprocessing-java-bundle/target/cics-eventprocessing-java-bundle-0.0.1-SNAPSHOT.zip`
4653

4754
## Configuration
48-
You'll need to define a Liberty JVM server with the name `DFHWLP`. This name can be modified in the `pom.xml` of the cics-eventprocessing-java-bundle module.
4955

50-
The Liberty JVM server will need the `cicsts:core-1.0`, `cicsts:link-1.0` and `servlet-3.1` features installed at minimum. A sample server.xml file is provided below
56+
You will need to define a CICS Liberty JVM server with the name `DFHWLP`. This name can be modified in the `pom.xml` of the cics-eventprocessing-java-bundle module.
57+
58+
The Liberty JVM server will need the following features installed at a minimum: `cicsts:core-1.0` and `cicsts:link-1.0` and `servlet-3.1`. For example:
5159

5260
```xml
5361
<server name="cics-eventprocessing-java">
54-
<featureManager>
55-
<feature>cicsts:core-1.0</feature>
56-
<feature>cicsts:link-1.0</feature>
57-
<feature>servlet-3.1</feature>
58-
</featureManager>
62+
<featureManager>
63+
<feature>cicsts:core-1.0</feature>
64+
<feature>cicsts:link-1.0</feature>
65+
<feature>servlet-3.1</feature>
66+
</featureManager>
5967

6068
<!-- More configuration -->
6169
</server>
6270
```
6371

6472
## Deploying
65-
1. Upload the built bumdle ZIP file to zFS on your z/OS system (using FTP or similar)
66-
2. Logon to zFS on your z/OS system (using SSH, OMVS or similar)
67-
3. Extract the ZIP file contents (e.g.: `unzip /path/to/bundle.zip`)
68-
4. On your CICS region, define a new `BUNDLE` resource with the `BUNDLEDIR` set to the extracted ZIP file contents
69-
5. Install the `BUNDLE` resource
7073

71-
You can confirm the application has started by inquiring the state of the `BUNDLE` (using `CEMT INQUIRE BUNDLE` or similar SPI, or the CICS Explorer bundle view).
74+
1. Upload the built bundle ZIP file to zFS on your z/OS system in binary using FTP, or similar
75+
2. Logon to zFS on your z/OS system using SSH, OMVS, or similar
76+
3. Extract the ZIP file contents, for example using command `unzip /path/to/bundle.zip`
77+
4. In CICS, define a new `BUNDLE` resource with the `BUNDLEDIR` set to the extracted ZIP file contents, then install the `BUNDLE` resource
78+
79+
You can confirm the application has started by inquiring the state of the `BUNDLE`, for example using transaction `CEMT INQUIRE BUNDLE`, or the CICS Explorer bundle view.
7280

7381
A message will be written to the Liberty `messages.log` file to confirm the application has started, and the base URL for this application.
7482

7583
## Running
84+
7685
1. Use a browser to target the address http://my.zos:9080/cics-eventprocessing-java-webapp/emit?name=EVENT replacing `my.zos` with the hostname of your z/OS system and `9080` with the port the Liberty JVM server is listening on.
7786
2. View the JVM server CURRENT.STDOUT file, this should contain two log messages
7887
* Emitted event
7988
* Consumed event
8089

81-
You can also emit an event using `EXEC CICS SIGNAL EVENT(EVENT)` either in another CICS program, or using the `CECI` transaction.
82-
90+
You can also emit an event using `EXEC CICS SIGNAL EVENT(event)` either in another CICS program, or using transaction `CECI`.
8391

8492
## License
85-
This project is licensed under [Eclipse Public License - v 2.0](LICENSE).
8693

94+
This project is licensed under [Eclipse Public License - v 2.0](LICENSE).

0 commit comments

Comments
 (0)