Top Description Methods
javax.resource.cci

public Interface Connection

Imports
javax.resource.ResourceException, .NotSupportedException

A Connection represents an application-level handle that is used by a client to access the underlying physical connection. The actual physical connection associated with a Connection instance is represented by a ManagedConnection instance.

A client gets a Connection instance by using the getConnection method on a ConnectionFactory instance. A connection can be associated with zero or more Interaction instances.

Author
Rahul Sharma
Version
0.8
See Also
javax.resource.cci.ConnectionFactory, javax.resource.cci.Interaction

Method Summary

Modifier and TypeMethod and Description
public void
close()

Initiates close of the connection handle at the application level.

public Interaction

Returns:

Interaction instance
createInteraction
()

Creates an Interaction associated with this Connection.

public LocalTransaction

Returns:

LocalTransaction instance
getLocalTransaction
()

Returns an LocalTransaction instance that enables a component to demarcate resource manager local transactions on the Connection.

public ConnectionMetaData

Returns:

ConnectionMetaData instance representing information about the EIS instance
getMetaData
()

Gets the information on the underlying EIS instance represented through an active connection.

public ResultSetInfo

Returns:

ResultSetInfo instance
getResultSetInfo
()

Gets the information on the ResultSet functionality supported by a connected EIS instance.

Method Detail

closeback to summary
public void close() throws ResourceException

Initiates close of the connection handle at the application level. A client should not use a closed connection to interact with an EIS.

Exceptions
ResourceException:
Exception thrown if close on a connection handle fails.

Any invalid connection close invocation--example, calling close on a connection handle that is already closed--should also throw this exception.

createInteractionback to summary
public Interaction createInteraction() throws ResourceException

Creates an Interaction associated with this Connection. An Interaction enables an application to execute EIS functions.

Returns:Interaction

Interaction instance

Exceptions
ResourceException:
Failed to create an Interaction
getLocalTransactionback to summary
public LocalTransaction getLocalTransaction() throws ResourceException

Returns an LocalTransaction instance that enables a component to demarcate resource manager local transactions on the Connection. If a resource adapter does not allow a component to demarcate local transactions on an Connection using LocalTransaction interface, then the method getLocalTransaction should throw a NotSupportedException.

Returns:LocalTransaction

LocalTransaction instance

Exceptions
ResourceException:
Failed to return a LocalTransaction instance because of a resource adapter error
NotSupportedException:
Demarcation of Resource manager local transactions is not supported on this Connection
See Also
javax.resource.cci.LocalTransaction
getMetaDataback to summary
public ConnectionMetaData getMetaData() throws ResourceException

Gets the information on the underlying EIS instance represented through an active connection.

Returns:ConnectionMetaData

ConnectionMetaData instance representing information about the EIS instance

Exceptions
ResourceException:
Failed to get information about the connected EIS instance. Error can be resource adapter-internal, EIS-specific or communication related.
getResultSetInfoback to summary
public ResultSetInfo getResultSetInfo() throws ResourceException

Gets the information on the ResultSet functionality supported by a connected EIS instance.

Returns:ResultSetInfo

ResultSetInfo instance

Exceptions
ResourceException:
Failed to get ResultSet related information
NotSupportedException:
ResultSet functionality is not supported