Package org.firebirdsql.jca
Class FBLocalTransaction
java.lang.Object
org.firebirdsql.jca.FBLocalTransaction
- All Implemented Interfaces:
javax.resource.cci.LocalTransaction,javax.resource.spi.LocalTransaction,FirebirdLocalTransaction
public class FBLocalTransaction
extends Object
implements FirebirdLocalTransaction, javax.resource.cci.LocalTransaction
The class
FBLocalTransaction implements LocalTransaction both
in the cci and spi meanings. A flag is used to distinguish the current
functionality. This class works by delegating the operations to the internal
implementations of the XAResource functionality in FBManagedConnection.- Version:
- 1.0
- Author:
- David Jencks
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final javax.resource.spi.ConnectionEventprotected final javax.resource.spi.ConnectionEventprotected final FBManagedConnectionprotected final javax.resource.spi.ConnectionEventprotected Xid -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Begin a local transaction.voidcommit()Commit a local transaction.getXid()Get the associated Xid.voidPerform the internal operations to begin a local transaction.voidPerform the internal processing to commit a local transaction.voidPerform the internal processing to rollback a local transaction.booleanCheck whether a started transaction is associated with the current database connection.voidrollback()Rollback a local transaction.
-
Field Details
-
mc
-
xid
-
beginEvent
protected final javax.resource.spi.ConnectionEvent beginEvent -
commitEvent
protected final javax.resource.spi.ConnectionEvent commitEvent -
rollbackEvent
protected final javax.resource.spi.ConnectionEvent rollbackEvent
-
-
Constructor Details
-
FBLocalTransaction
-
-
Method Details
-
getXid
Get the associated Xid.- Specified by:
getXidin interfaceFirebirdLocalTransaction- Returns:
- instance of
Xidrepresenting a transaction ID that is managed by this local transaction.
-
inTransaction
public boolean inTransaction() throws javax.resource.ResourceExceptionCheck whether a started transaction is associated with the current database connection.- Specified by:
inTransactionin interfaceFirebirdLocalTransaction- Returns:
trueif managed connection is participating in transaction.- Throws:
javax.resource.ResourceException- if operation cannot be completed.
-
begin
public void begin() throws javax.resource.ResourceExceptionBegin a local transaction.- Specified by:
beginin interfacejavax.resource.cci.LocalTransaction- Specified by:
beginin interfacejavax.resource.spi.LocalTransaction- Throws:
javax.resource.ResourceException- generic exception if operation failsjavax.resource.spi.LocalTransactionException- error condition related to local transaction managementjavax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapterjavax.resource.spi.EISSystemException- EIS instance specific error condition
-
internalBegin
public void internalBegin() throws javax.resource.ResourceExceptionPerform the internal operations to begin a local transaction.- Throws:
javax.resource.ResourceException- generic exception if operation failsjavax.resource.spi.LocalTransactionException- error condition related to local transaction managementjavax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapterjavax.resource.spi.EISSystemException- EIS instance specific error condition
-
commit
public void commit() throws javax.resource.ResourceExceptionCommit a local transaction.- Specified by:
commitin interfacejavax.resource.cci.LocalTransaction- Specified by:
commitin interfacejavax.resource.spi.LocalTransaction- Throws:
javax.resource.ResourceException- generic exception if operation failsjavax.resource.spi.LocalTransactionException- error condition related to local transaction managementjavax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapterjavax.resource.spi.EISSystemException- EIS instance specific error condition
-
internalCommit
public void internalCommit() throws javax.resource.ResourceExceptionPerform the internal processing to commit a local transaction.- Throws:
javax.resource.ResourceException- generic exception if operation failsjavax.resource.spi.LocalTransactionException- error condition related to local transaction managementjavax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapterjavax.resource.spi.EISSystemException- EIS instance specific error condition
-
rollback
public void rollback() throws javax.resource.ResourceExceptionRollback a local transaction.- Specified by:
rollbackin interfacejavax.resource.cci.LocalTransaction- Specified by:
rollbackin interfacejavax.resource.spi.LocalTransaction- Throws:
javax.resource.ResourceException- generic exception if operation failsjavax.resource.spi.LocalTransactionException- error condition related to local transaction managementjavax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapterjavax.resource.spi.EISSystemException- EIS instance specific error condition
-
internalRollback
public void internalRollback() throws javax.resource.ResourceExceptionPerform the internal processing to rollback a local transaction.- Throws:
javax.resource.ResourceException- generic exception if operation failsjavax.resource.spi.LocalTransactionException- error condition related to local transaction managementjavax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapterjavax.resource.spi.EISSystemException- EIS instance specific error condition
-