|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttyrex.resource.jdbc.xa.TyrexConnection
tyrex.resource.jdbc.xa.ClientConnection
Encapsulates an application's view of an XA/pooled connection.
The XA connection is managed by the application server through it's
XAConnection interface. The underlying JDBC
connection is a standard JDBC connection. The application's
JDBC connection gives access to the underlying JDBC connection but
is managed by the application server. The application is given an
instance of this class and not the underlying connection directly.
XAConnectionImpl,
XADataSourceImpl,
Connection| Field Summary |
| Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Constructor Summary | |
(package private) |
ClientConnection(XAConnectionImpl xaConn,
XADataSourceImpl xaDataSource,
int clientId)
Construct a new client connection to provide access to the underlying JDBC connection (underlying) on behalf of an XA/pooled connection (xaConn). |
| Method Summary | |
void |
commit()
|
boolean |
getAutoCommit()
|
protected void |
internalClose()
Method that actually closes the connection. |
protected java.sql.Connection |
internalGetUnderlyingConnection()
Called to retrieve the underlying JDBC connection. |
boolean |
isClosed()
Return true if the connection is closed. |
protected void |
notifyError(java.sql.SQLException except)
Called when an exception is thrown by the underlying connection to determine whether the exception is critical or not. |
void |
rollback()
|
void |
setAutoCommit(boolean autoCommit)
|
java.lang.String |
toString()
Called by XAConnectionImpl to terminate this connection
by dissociating it from the underlying JDBC connection. |
| Methods inherited from class tyrex.resource.jdbc.xa.TyrexConnection |
clearWarnings, close, createStatement, createStatement, createStatement, finalize, getCatalog, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.sql.Connection |
clearWarnings, close, createStatement, createStatement, createStatement, getCatalog, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
| Constructor Detail |
ClientConnection(XAConnectionImpl xaConn,
XADataSourceImpl xaDataSource,
int clientId)
xaConn - The XA/pooled connection that created this
client connectionxaDataSource - the data source that created the xaConnclientId - A unique identifier handed to us by
XAConnection| Method Detail |
public void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface java.sql.ConnectionsetAutoCommit in class TyrexConnectionjava.sql.SQLException
public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.ConnectiongetAutoCommit in class TyrexConnectionjava.sql.SQLException
public void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectioncommit in class TyrexConnectionjava.sql.SQLException
public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionrollback in class TyrexConnectionjava.sql.SQLException
protected void internalClose()
throws java.sql.SQLException
TyrexConnection
internalClose in class TyrexConnectionjava.sql.SQLException - if there is a problem closing the connectionTyrexConnection.close()public boolean isClosed()
TyrexConnection
isClosed in interface java.sql.ConnectionisClosed in class TyrexConnectionpublic java.lang.String toString()
XAConnectionImpl to terminate this connection
by dissociating it from the underlying JDBC connection.
The application would call TyrexConnection.close() but XAConnectionImpl cannot, since pooled connection requirements
will cause an inifinite loop. This method should not attempt
to notify either a closure or fatal error, but rather throw an
exception if it fails.
protected void notifyError(java.sql.SQLException except)
notifyError in class TyrexConnectionexcept - The exception thrown by the underlying
connection
protected java.sql.Connection internalGetUnderlyingConnection()
throws java.sql.SQLException
internalGetUnderlyingConnection in class TyrexConnectionjava.sql.SQLException - if the connection cannot be retrieved.#getUnderlyingConnection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||