|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines two-phase commit support for a JDBC connection used by
XAConnectionImpl
. A JDBC connection that can implement any
of these features should extend this interface and attempt to
implement as much as it can.
prepare()
is used as part of the two phase commit protocol
to determine whether the transaction can commit or must rollback.
Failure to implement this method will cause all connections to vote
for commit, whether or not they can actually commit, leading to
mixed heuristics.
enableSQLTransactions(boolean)
allows the SQL begin/commit/rollback
commands to be disabled for the duration of a transaction managed
through an XAResource
, preventing the
application from demarcating transactions directly.
isCriticalError(java.sql.SQLException)
is used to tell if an exception thrown by
the connection is fatal and the connection should not be returned
to the pool.
Method Summary | |
void |
enableSQLTransactions(boolean flag)
Enables or disables transaction demarcation through SQL commit and rollback. |
boolean |
isCriticalError(java.sql.SQLException except)
Returns true if the error issued by this connection is a critical error and the connection should be terminated. |
boolean |
prepare()
Called to prepare the transaction for commit. |
Method Detail |
public void enableSQLTransactions(boolean flag)
XAConnectionImpl
, SQL commit/rollback commands will be
disabled to prevent direct transaction demarcation.
flag
- True to enable SQL transactions (the default)public boolean prepare() throws java.sql.SQLException
RollbackException
.
java.sql.SQLException
- If transaction has been marked for
rollback or cannot commit for any reasonpublic boolean isCriticalError(java.sql.SQLException except)
except
- The exception thrown by this connection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |