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 java.lang.Object implements FirebirdLocalTransaction, javax.resource.cci.LocalTransaction The classFBLocalTransactionimplements 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 SummaryNested Classes Modifier and Type Class Description static classFBLocalTransaction.FBLocalXid
 - 
Field SummaryFields Modifier and Type Field Description protected javax.resource.spi.ConnectionEventbeginEventprotected javax.resource.spi.ConnectionEventcommitEventprotected FBManagedConnectionmcprotected javax.resource.spi.ConnectionEventrollbackEventprotected javax.transaction.xa.Xidxid
 - 
Constructor SummaryConstructors Constructor Description FBLocalTransaction(FBManagedConnection mc, FBConnection c)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()Begin a local transaction.voidcommit()Commit a local transaction.javax.transaction.xa.XidgetXid()Get the associated Xid.voidinternalBegin()Perform the internal operations to begin a local transaction.voidinternalCommit()Perform the internal processing to commit a local transaction.voidinternalRollback()Perform the internal processing to rollback a local transaction.booleaninTransaction()Check whether a started transaction is associated with the current database connection.voidrollback()Rollback a local transaction.
 
- 
- 
- 
Field Detail- 
mcprotected final FBManagedConnection mc 
 - 
xidprotected javax.transaction.xa.Xid xid 
 - 
beginEventprotected final javax.resource.spi.ConnectionEvent beginEvent 
 - 
commitEventprotected final javax.resource.spi.ConnectionEvent commitEvent 
 - 
rollbackEventprotected final javax.resource.spi.ConnectionEvent rollbackEvent 
 
- 
 - 
Constructor Detail- 
FBLocalTransactionpublic FBLocalTransaction(FBManagedConnection mc, FBConnection c) 
 
- 
 - 
Method Detail- 
getXidpublic javax.transaction.xa.Xid getXid() Get the associated Xid.- Specified by:
- getXidin interface- FirebirdLocalTransaction
- Returns:
- instance of Xidrepresenting a transaction ID that is managed by this local transaction.
 
 - 
inTransactionpublic boolean inTransaction() throws javax.resource.ResourceExceptionCheck whether a started transaction is associated with the current database connection.- Specified by:
- inTransactionin interface- FirebirdLocalTransaction
- Returns:
- trueif managed connection is participating in transaction.
- Throws:
- javax.resource.ResourceException- if operation cannot be completed.
 
 - 
beginpublic void begin() throws javax.resource.ResourceExceptionBegin a local transaction.- Specified by:
- beginin interface- javax.resource.cci.LocalTransaction
- Specified by:
- beginin interface- javax.resource.spi.LocalTransaction
- Throws:
- javax.resource.ResourceException- generic exception if operation fails
- javax.resource.spi.LocalTransactionException- error condition related to local transaction management
- javax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapter
- javax.resource.spi.EISSystemException- EIS instance specific error condition
 
 - 
internalBeginpublic void internalBegin() throws javax.resource.ResourceExceptionPerform the internal operations to begin a local transaction.- Throws:
- javax.resource.ResourceException- generic exception if operation fails
- javax.resource.spi.LocalTransactionException- error condition related to local transaction management
- javax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapter
- javax.resource.spi.EISSystemException- EIS instance specific error condition
 
 - 
commitpublic void commit() throws javax.resource.ResourceExceptionCommit a local transaction.- Specified by:
- commitin interface- javax.resource.cci.LocalTransaction
- Specified by:
- commitin interface- javax.resource.spi.LocalTransaction
- Throws:
- javax.resource.ResourceException- generic exception if operation fails
- javax.resource.spi.LocalTransactionException- error condition related to local transaction management
- javax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapter
- javax.resource.spi.EISSystemException- EIS instance specific error condition
 
 - 
internalCommitpublic void internalCommit() throws javax.resource.ResourceExceptionPerform the internal processing to commit a local transaction.- Throws:
- javax.resource.ResourceException- generic exception if operation fails
- javax.resource.spi.LocalTransactionException- error condition related to local transaction management
- javax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapter
- javax.resource.spi.EISSystemException- EIS instance specific error condition
 
 - 
rollbackpublic void rollback() throws javax.resource.ResourceExceptionRollback a local transaction.- Specified by:
- rollbackin interface- javax.resource.cci.LocalTransaction
- Specified by:
- rollbackin interface- javax.resource.spi.LocalTransaction
- Throws:
- javax.resource.ResourceException- generic exception if operation fails
- javax.resource.spi.LocalTransactionException- error condition related to local transaction management
- javax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapter
- javax.resource.spi.EISSystemException- EIS instance specific error condition
 
 - 
internalRollbackpublic void internalRollback() throws javax.resource.ResourceExceptionPerform the internal processing to rollback a local transaction.- Throws:
- javax.resource.ResourceException- generic exception if operation fails
- javax.resource.spi.LocalTransactionException- error condition related to local transaction management
- javax.resource.spi.ResourceAdapterInternalException- error condition internal to resource adapter
- javax.resource.spi.EISSystemException- EIS instance specific error condition
 
 
- 
 
-