You can install applications resources through traditional methods such as CSD or BAS,
or you can add application resources to CICS® bundles. CICS bundles provide a convenient and co-located technique to
group application code and CICS resources together. This is useful if, for example, you deploy a Enterprise Java application in a CICS bundle. You might want to provide a URI map that maps the inbound web
requests to run under a specific application transaction.
About this task
By default all Enterprise Java application requests use a transaction that is called CJSA that is supplied by CICS. However, you can map the
application URI from an inbound request to a different transaction. You might find this feature
useful if you want to securely control access to the application because a security administrator
can configure CICS to control which transactions are accessed
by users.
Procedure
-
Create a definition for the application transaction:
-
Switch to the Eclipse Resource perspective. Right-click the CICS bundle project and click .
The New Transaction Definition wizard opens.
-
Enter a 4-character name for the transaction.
Do not start the transaction name with C because this letter is reserved by CICS.
-
Enter the program name DFHSJTHP.
You must use this CICS program because it handles the security checking of inbound Enterprise Java requests to the Liberty server.
-
Click Finish to create the definition in the CICS bundle project.
Do not set attributes to create a remote transaction because the application transaction must
always run in the CICS region where the Enterprise Java application is running.
-
Create a definition for the URI map:
-
Right-click the CICS bundle project and click .
-
Enter an 8-character name for the URI map.
Do not start URI maps names with DFH because this prefix is reserved by CICS.
-
Enter the host name.
You can either use a * to match any host name, or specify the host
name of the machine where your application is going to run.
-
Enter the path for the application URI.
CICS matches the URI in the inbound request to the value in
the URI map and runs the application transaction.
-
In the Usage section, select JVM server and optionally enter the port
number.
-
Click Finish to create the URI map.
-
Edit the URI map definition:
-
Edit the Scheme field to enter the scheme for the URI map. HTTP is the default, but you can set
HTTPS if you want to use SSL security to encrypt the request.
You can use basic authentication, where a user ID and password are supplied in the HTTP
header, on both HTTP and HTTPS requests.
-
Edit the Transaction field to enter the name of the application transaction.
- Optional:
Edit the user ID field to enter a user ID to run the application request.
This value is ignored if basic authentication is enabled. If you do not supply a value and
the HTTP request does not include a user ID and password, CICS runs the request under the default user ID of the CICS region.
Results
You created a URI map and a transaction in the CICS
bundle project. When the bundle is deployed and installed, these resources are created dynamically
in the CICS region.
What to do next
You can create extra resources if you want to run different application operations under
different transactions, or if you want to support both HTTP and HTTPS schemes. If your application
is ready to deploy, see Deploying a CICS bundle in the CICS Explorer product documentation.