12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Packaging and Deployment<br />

■<br />

InteractionSpec An InteractionSpec implementation defines all interaction-relevant<br />

properties of a connector (for example, the name of the program to call, the<br />

interaction mode, and so forth). The InteractionSpec is passed as an argument to an<br />

Interaction implementation when a particular interaction has to be carried out.<br />

■<br />

Input and output The input and output are records.<br />

A record is a logical collection of application data elements that combines the actual<br />

record bytes together with its type. Examples are COBOL and C data structures.<br />

Record implementation in CCI uses streams. In the javax.resource.cci.Streamable<br />

interface, reading and writing from streams is handled by read and write methods. In<br />

the javax.resource.cci.Record interface, getRecordName() and<br />

getRecordShortDescription(), and setRecordName() and setRecordShortDescription()<br />

get and set the record data.<br />

You must create records for all of the data structures that are externalized by the EIS<br />

functions you want to reuse. You then use the records as input and output objects that<br />

pass data via a Resource Adapter to and from an EIS. You will want to consider the<br />

following options when creating a record:<br />

■<br />

■<br />

■<br />

Having direct access to nested, or hierarchical, records A direct, or 'flattened',<br />

set of accessor methods may be more convenient, or seem more natural, to some<br />

users. For example, programmers accustomed to COBOL may expect to be able to<br />

refer directly to the field of a sub-record if the field name is unique within the record.<br />

This is similar to the way COBOL field names are scoped. There is no need to<br />

qualify field names if the field name is unique.<br />

Custom and Dynamic Records You can generally create two types of records:<br />

custom and dynamic. The main difference between these is the way fields are<br />

accessed. For dynamic records, the fields are found by taking the field name,<br />

looking up the offset and the marshalling of the information, and then accessing it.<br />

For custom records, the offset and the marshalling of the information is in the code,<br />

resulting in faster access. Generating custom records results in more efficient code,<br />

but there are restrictions on their use.<br />

Records with or without notification If a record is created with notification, then<br />

the properties of the record are bound. Note: If bound properties are not required,<br />

then it is more efficient to create a record without notification.<br />

Packaging and Deployment<br />

The Connectors provides packaging and deployment interfaces so that various<br />

Resource Adapters can be deployed to J2EE 1.3 Platform compliant application<br />

<strong>server</strong>s, such as the <strong>Borland</strong> Enterprise Server.<br />

Chapter 26: VisiConnect overview 253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!