public class FBLocalTransaction extends java.lang.Object implements FirebirdLocalTransaction, javax.resource.cci.LocalTransaction
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.Modifier and Type | Class and Description |
---|---|
static class |
FBLocalTransaction.FBLocalXid |
Modifier and Type | Field and Description |
---|---|
protected javax.resource.spi.ConnectionEvent |
beginEvent |
protected javax.resource.spi.ConnectionEvent |
commitEvent |
protected FBManagedConnection |
mc |
protected javax.resource.spi.ConnectionEvent |
rollbackEvent |
protected javax.transaction.xa.Xid |
xid |
Constructor and Description |
---|
FBLocalTransaction(FBManagedConnection mc,
FBConnection c) |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin a local transaction.
|
void |
commit()
Commit a local transaction.
|
javax.transaction.xa.Xid |
getXid()
Get the associated Xid.
|
void |
internalBegin()
Perform the internal operations to begin a local transaction.
|
void |
internalCommit()
Perform the internal processing to commit a local transaction.
|
void |
internalRollback()
Perform the internal processing to rollback a local transaction.
|
boolean |
inTransaction()
Check whether a started transaction is associated with the current
database connection.
|
void |
rollback()
Rollback a local transaction.
|
protected final FBManagedConnection mc
protected javax.transaction.xa.Xid xid
protected final javax.resource.spi.ConnectionEvent beginEvent
protected final javax.resource.spi.ConnectionEvent commitEvent
protected final javax.resource.spi.ConnectionEvent rollbackEvent
public FBLocalTransaction(FBManagedConnection mc, FBConnection c)
public javax.transaction.xa.Xid getXid()
getXid
in interface FirebirdLocalTransaction
Xid
representing a transaction ID that is managed by this local transaction.public boolean inTransaction() throws javax.resource.ResourceException
inTransaction
in interface FirebirdLocalTransaction
true
if managed connection is participating in
transaction.javax.resource.ResourceException
- if operation cannot be completed.public void begin() throws javax.resource.ResourceException
begin
in interface javax.resource.cci.LocalTransaction
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 conditionpublic void internalBegin() throws javax.resource.ResourceException
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 conditionpublic void commit() throws javax.resource.ResourceException
commit
in interface javax.resource.cci.LocalTransaction
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 conditionpublic void internalCommit() throws javax.resource.ResourceException
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 conditionpublic void rollback() throws javax.resource.ResourceException
rollback
in interface javax.resource.cci.LocalTransaction
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 conditionpublic void internalRollback() throws javax.resource.ResourceException
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 conditionCopyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.