|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.j2ca.base.WBIConnection
A Connection instance represents a client-level handle to the physical EIS connection.
This class provides a foundation implementation that offers:
WBIManagedConnection
associated with
this handle)A subclass should:
createInteraction()
and provide an EIS-specific
Interaction instance so that clients can invoke functions on the underlying
EIS.getManagedConnection()
to retrieve the managed
connection for this class. Do not cache this value, as it can change between
client requests.checkValidity()
at the
beginning of each method to ensure the state of the handle is valid.
Constructor Summary | |
---|---|
WBIConnection(WBIManagedConnection managedConnection)
Constructor will automatically associate the handle and extract needed configuration details from the ManagedConnection instance provided. |
Method Summary | |
---|---|
protected void |
checkValidity()
Verifies that this connection handle is still valid. |
void |
close()
Invalidates this connection handle and notifies both the underlying WBIManagedConnection as well as the resource adapter container that this handle is no longer needed by the client. |
abstract javax.resource.cci.Interaction |
createInteraction()
Developers should provide an EIS-specific Interaction implementation that can handle processing requests on the EIS. |
boolean |
getAutoCommit()
Returns whether this connection handle should commit changes to the EIS after each interaction or wait for the resource adapter container to direct the managed connection to commit changes. |
javax.resource.cci.LocalTransaction |
getLocalTransaction()
Returns a LocalTransaction instance that delegates calls to the underlying WBIManagedConnection. |
LogUtils |
getLogUtils()
|
WBIManagedConnection |
getManagedConnection()
Returns the ManagedConnection instance associated with the
handle. |
javax.resource.cci.ConnectionMetaData |
getMetaData()
Returns information to the client on the capabilities and underlying EIS reflected by this connection handle. |
javax.resource.cci.ResultSetInfo |
getResultSetInfo()
By default, this method throws a NotSupportedException . |
protected void |
setLogUtils(LogUtils utils)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WBIConnection(WBIManagedConnection managedConnection) throws javax.resource.ResourceException
Method Detail |
public abstract javax.resource.cci.Interaction createInteraction() throws javax.resource.ResourceException
createInteraction
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public void close() throws javax.resource.ResourceException
close
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public javax.resource.cci.ConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public javax.resource.cci.ResultSetInfo getResultSetInfo() throws javax.resource.ResourceException
NotSupportedException
. If a subclass supports
result sets (not batch results), it should override this method.
getResultSetInfo
in interface javax.resource.cci.Connection
javax.resource.NotSupportedException
- if the managed connection does not support result sets.
javax.resource.ResourceException
public javax.resource.cci.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
getLocalTransaction
in interface javax.resource.cci.Connection
javax.resource.NotSupportedException
- if the managed connection does not support local
transactions.
javax.resource.ResourceException
public WBIManagedConnection getManagedConnection() throws javax.resource.ResourceException
ManagedConnection
instance associated with the
handle. A subclass should always use this method, since the resource
adapter container may dissociate a handle from its original managed
connection to free up resources; this method will check and automatically
re-associate the handle if it has become dissociated. Caching a reference
to maintain the association will lead to unpredictable results.
javax.resource.ResourceException
protected void checkValidity() throws javax.resource.spi.IllegalStateException
java.lang.IllegalStateException
- (intended for the client) if the handle was closed or
invalidated previously.
javax.resource.spi.IllegalStateException
public boolean getAutoCommit() throws javax.resource.ResourceException
Note that this does not change the atomicity of requested interactions;
for example, if an interaction requires the creation of two entities in
the EIS and auto-commit is set to true
, the two entities should be
created as part of a single atomic operation rather than two discrete
create operations. The failure of an interaction should always rollback
the EIS to the original state it was in before the interaction was started,
regardless of this flag.
javax.resource.ResourceException
public LogUtils getLogUtils()
protected void setLogUtils(LogUtils utils)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |