Top Description Methods
javax.resource.cci

public Interface Interaction

Imports
javax.resource.ResourceException, .NotSupportedException

The javax.resource.cci.Interaction enables a component to execute EIS functions. An Interaction instance supports the following ways of interacting with an EIS instance:

An Interaction instance is created from a Connection and is required to maintain its association with the Connection instance. The close method releases all resources maintained by the resource adapter for the Interaction. The close of an Interaction instance should not close the associated Connection instance.

Author
Rahul Sharma
Since
0.8
Version
0.8
See Also
java.sql.ResultSet

Method Summary

Modifier and TypeMethod and Description
public void
clearWarnings()

Clears all the warning reported by this Interaction instance.

public void
close()

Closes the current Interaction and release all the resources held for this instance by the resource adapter.

public boolean

Returns:

true if execution of the EIS function has been successful and output Record has been updated; false otherwise
execute
(InteractionSpec
InteractionSpec representing a target EIS data/function module
ispec
,
Record
Input Record
input
,
Record
Output Record
output
)

Executes an interaction represented by the InteractionSpec.

public Record

Returns:

output Record if execution of the EIS function has been successful; null otherwise
execute
(InteractionSpec
InteractionSpec representing a target EIS data/function module
ispec
,
Record
Input Record
input
)

Executes an interaction represented by the InteractionSpec.

public Connection

Returns:

Connection instance associated with the Interaction
getConnection
()

Gets the Connection associated with the Interaction.

public ResourceWarning

Returns:

ResourceWarning at top of the warning chain
getWarnings
()

Gets the first ResourceWarning from the chain of warnings associated with this Interaction instance.

Method Detail

clearWarningsback to summary
public void clearWarnings() throws ResourceException

Clears all the warning reported by this Interaction instance. After a call to this method, the method getWarnings will return null until a new warning is reported for this Interaction.

Exceptions
ResourceException:
Failed to clear ResourceWarnings associated with Interaction
closeback to summary
public void close() throws ResourceException

Closes the current Interaction and release all the resources held for this instance by the resource adapter. The close of an Interaction instance does not close the associated Connection instance. It is recommended that Interaction instances be closed explicitly to free any held resources.

Exceptions
ResourceException:
Failed to close the Interaction instance. Invoking close on an already closed Interaction should also throw this exception.
executeback to summary
public boolean execute(InteractionSpec ispec, Record input, Record output) throws ResourceException

Executes an interaction represented by the InteractionSpec. This form of invocation takes an input Record and updates the output Record.

Parameters
ispec:InteractionSpec

InteractionSpec representing a target EIS data/function module

input:Record

Input Record

output:Record

Output Record

Returns:boolean

true if execution of the EIS function has been successful and output Record has been updated; false otherwise

Exceptions
ResourceException:
Exception if execute operation fails. Examples of error cases are:
  • Resource adapter internal, EIS-specific or communication error
  • Invalid specification of an InteractionSpec, input or output record structure
  • Errors in use of input or output Record
  • Invalid connection associated with this Interaction
NotSupportedException:
Operation not supported
executeback to summary
public Record execute(InteractionSpec ispec, Record input) throws ResourceException

Executes an interaction represented by the InteractionSpec. This form of invocation takes an input Record and returns an output Record if the execution of the Interaction has been successfull.

Parameters
ispec:InteractionSpec

InteractionSpec representing a target EIS data/function module

input:Record

Input Record

Returns:Record

output Record if execution of the EIS function has been successful; null otherwise

Exceptions
ResourceException:
Exception if execute operation fails. Examples of error cases are:
  • Resource adapter internal, EIS-specific or communication error
  • Invalid specification of an InteractionSpec or input record structure
  • Errors in use of input Record or creation of an output Record
  • Invalid connection associated with this Interaction
NotSupportedException:
Operation not supported
getConnectionback to summary
public Connection getConnection()

Gets the Connection associated with the Interaction.

Returns:Connection

Connection instance associated with the Interaction

getWarningsback to summary
public ResourceWarning getWarnings() throws ResourceException

Gets the first ResourceWarning from the chain of warnings associated with this Interaction instance.

Returns:ResourceWarning

ResourceWarning at top of the warning chain

Exceptions
ResourceException:
Failed to get ResourceWarnings associated with Interaction