This tutorial describes how to use the J2C bean wizard
to build a message-driven bean that processes an IMS™ inbound transaction.
This tutorial might require some optionally installable
components. If you encounter errors or cannot find user interface
options when you run the sample, ensure that you installed the appropriate
optional components:
- IBM® WebSphere® Application Server, version V7.0, V8.0, or V8.5.
To use this sample, you must have an application server installed
and configured. To verify that a server runtime environment is available,
click , expand Server, and then click
Installed
Runtimes. You can use this pane to add, remove, or edit
installed server runtime definitions. You can also download and install
support for a new server.
This tutorial is divided into several
exercises that must be completed in sequence for the tutorial to work
properly. This tutorial teaches you how to use the J2C Java™ Bean wizard to create a Java bean that runs a transaction in IMS™. While completing the exercises,
you
- Use the J2C bean wizard to create a message-driven bean that runs
an IMS inbound transaction
- Deploy and run the MDB in the WebSphere® Application Server
- Set up and run the IMS callout
sample application to issue a synchronous callout message
Overview
When an IMS application issues a request to an external Java application or web service and expects
a response to return in the same transaction, the request is referred
to as a synchronous callout request from the perspective of an IMS application, and as an inbound
transaction from the perspective of WebSphere Application Server.
When
an IMS application issues a synchronous
callout request, it must specify an IMS OTMA destination descriptor that handles the routing of
the message. This destination contains the name of the transaction
pipe (TPIPE) that is used to hold the callout message. The IMS TM resource adapter that is deployed
on WebSphere Application
Server pulls the callout requests from the hold queue.
Steps
to implement a synchronous callout solution for an IMS application:
- Create or modify an IMS application
to issue a callout request by using the DL/I ICAL call (on the IMS host system)
- Define an OTMA destination descriptor (on the IMS host system)
- Create a J2C application for an IMS inbound transaction
- Run the IMS application to
issue the synchronous callout request (on the IMS host system)
Note: This tutorial demonstrates step 3 in the overall implementation.
For end-to-end testing and verification, if you choose to
import the IMS inbound sample,
this tutorial also provides instructions to modify the inbound sample
so you can use the IMS callout
sample application that is provided with the IMS synchronous callout function through the IMS installation verification program
(IVP). This IMS callout sample
IVP includes:
- A sample IMS application
that, when run, issues a synchronous callout request. This application
specifies to use a pre-defined OTMA destination descriptor (IVPDTOR4)
and transaction pipe (IVPPIPE4) for routing and queuing the callout
message. All this sample IMS application
does is to issue a callout request with a "HELLO FROM IMS" message and waits for a response.
- IVP jobs and tasks that you can run to set up the required OTMA
destination descriptor for routing the callout message and the transaction
pipe (a queue) for holding the callout message.
The following diagram describes the IMS synchronous callout message flow, by using
the OTMA destination descriptor name and TPIPE value (queue name)
that are supplied in the IMS callout
sample IVP.
Learning objectives In this tutorial,
you will:
- Use the J2C bean wizard to create a message-driven bean that runs
an IMS inbound transaction
- Deploy and run the MDB in the WebSphere Application Server
- Set up and run the IMS application
for synchronous callout messages
Time required
This tutorial takes approximately
30 minutes to finish. If you explore other concepts related to this
tutorial, it could take longer to complete.
Skill level
Experienced
Audience
This tutorial is intended for
users who are familiar with Enterprise Information systems (EIS) and IMS in particular.
System requirements
To complete
this tutorial, you need to have the following tools and components
installed:
- IBM® WebSphere® Application Server, version V7.0,
V8.0, or V8.5.
- J2EE Connector (J2C) tools installed
- Information about your IMS environment: In this tutorial, your application interacts with
an application program in IMS. You need to obtain information such as the host name and port number
of IMS Connect and the name of
the IMS data store where the
transaction runs. Contact your IMS systems administrator for this information. In addition, you need
to perform some setup work in IMS if you want to run this sample.
- A copy of the COBOL file SYCALOUT.cpy:
You may locate this file in your product installation directory: <installdir>\IBM\SDP70Shared\plugins\com.ibm.j2c.cheatsheet.content_7.0.0\samples\IMS\inbound.
If you want to store it locally, you can copy the code from here: dsycalout.cpy
- A clean workspace.
Prerequisites
In order to complete this
tutorial end to end, you should be familiar with:
- J2EE and Java programming
- Basic IMS Transaction Manager
(IMS TM) concepts
- Prerequisites on the IMS host
system: