To use channels and containers in the JEE Connector Architecture
(JCA), use an ECIChannelRecord to hold your data. When
the ECIChannelRecord is passed to the execute() method
of ECIInteraction, the method uses the ECIChannelRecord itself to
create a channel and converts the entries inside the ECIChannelRecord
into containers before passing them to CICS®.
The ECIChannelRecord allows multiple data records to pass over
the same interface to and from the
execute() method
of ECIInteraction. A container is created for each entry in the channel.
You can have a combination of container types in one channel. The
containers are of the following types:
- A container with a data type of BIT. This type of container is
created when the entry is a byte[], or implements
the javax.resource.cci.Streamable interface. No code
page conversion takes place.
- A container with a data type of CHAR. This type of container is
created when you use a String to create the entry.
You can create your own data records, which must conform to existing
JCA rules (they must implement the javax.resource.cci.Streamable and javax.resource.cci.Record interfaces).
Any data records you create are treated as containers with a data
type of BIT.
You can also use an existing Record type, for example, JavaStringRecord,
to create a container with a data type of BIT.
The ECIChannelRecord.getRecordName method obtains
the name of the channel. When creating your Record, you must make
sure that the name is not an empty string. The record.getRecordName method
retrieves the name of the containers.
The JCA resource adapter handles ECIChannelRecord and Records
differently, when it receives the data in the
execute() method
of ECIInteraction.
- When an ECIChannelRecord is received, the resource adapter uses
a channel to send the data.
- When a Record (that is not an ECIChannelRecord) is received, the
resource adapter uses a COMMAREA to send the data.
Figure 1. Data conversion
by the execute() method of ECIInteraction, depending on whether it
receives a Record or ECIChannelRecord