|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tyrex.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.Connection
setAutoCommit
in class TyrexConnection
java.sql.SQLException
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
getAutoCommit
in class TyrexConnection
java.sql.SQLException
public void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
commit
in class TyrexConnection
java.sql.SQLException
public void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
rollback
in class TyrexConnection
java.sql.SQLException
protected void internalClose() throws java.sql.SQLException
TyrexConnection
internalClose
in class TyrexConnection
java.sql.SQLException
- if there is a problem closing the connectionTyrexConnection.close()
public boolean isClosed()
TyrexConnection
isClosed
in interface java.sql.Connection
isClosed
in class TyrexConnection
public 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 TyrexConnection
except
- The exception thrown by the underlying
connectionprotected java.sql.Connection internalGetUnderlyingConnection() throws java.sql.SQLException
internalGetUnderlyingConnection
in class TyrexConnection
java.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 |