You can define the data binding implementation class or classes in the import or export files. Specific interfaces must be implemented if a record0based data binding is used.
The RecordDataBinding interface extends the basic interface and adds to it the javax.resource.cci.Record. If the data binding is to be used with the J2EE Connector Architecture based service, it must implement this interface. As a record, it can be passed to the execute method of the Resource Adapter Interaction with input and output.
This interface is not sufficient if the Resource Adapter supports an input-only variant of the execute method on the Interaction. This limitation arises because an input-only execution returns the result as the cci Record. In this instance the record needs to be set on the data binding and then the converted Data Object can be retrieved. If the Resource Adapter supports the input-only variant of the execute method, the Data Binding provider needs to implement the RecordHolderDataBinding interface.
You must also implement the RecordHolderDataBinding interface for an inbound J2C communication. The listener interface is invoked by the Resource Adapter and the MDB implementing it is passed as native data. This data needs to be set on the data binding to be able to retrieve from it Business Object. If the listener argument and return are typed as javax.resource.cci.Record, the RecordHolderDataBinding is sufficient. If the listener argument(s) or return type is other than cci Record, the utility interface InboundNativeDataRecord is provided.
An arbitrary number and types of arguments to the listener can be set on the InboundNativeDataRecord interface, as an object array. The implementation, a cci Record can then be set on the RecordHolderDataBinding interface thus passing all the listener arguments and allowing the Data Binding to retrieve arguments and create the business object. On the return, the data binding implementation sets the return value in the symmetric manner. The runtime then uses the get method, also returning an object array, the argument at index 0 is the return value to be returned to the invoker (the Resource Adapter).
Last updated: Wed 06 Dec 2006 07:08:08
(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)