public class JDBCDatabaseTransaction extends Object implements DatabaseTransaction
| Modifier and Type | Class and Description |
|---|---|
static class |
JDBCDatabaseTransaction.ManagedRegistryConnection
Wrapped connection that manages connections making it possible to have connections to
multiple databases.
|
| Constructor and Description |
|---|
JDBCDatabaseTransaction() |
| Modifier and Type | Method and Description |
|---|---|
void |
decNestedDepth()
This method will decrement the nested depth of the transaction on the current session.
|
static JDBCDatabaseTransaction.ManagedRegistryConnection |
getConnection()
Method to get connection.
|
static JDBCDatabaseTransaction.ManagedRegistryConnection |
getManagedRegistryConnection(Connection conn)
Method to obtain a connection that is managed by the registry transactions implementation.
|
int |
getNestedDepth()
Method to obtain the depth of nesting of this transaction at a given point in time.
|
void |
incNestedDepth()
This method will increment the nested depth of the transaction on the current session.
|
boolean |
isRollbacked()
Method to determine whether this transaction has been rollbacked at least once.
|
boolean |
isStarted()
Method to determine whether a transaction is started or not.
|
void |
popTransaction()
Pop stacked transaction and replace the existing one with that.
|
void |
pushTransaction()
Push current transaction to a stack and make room for a new one.
|
static void |
removeConnection()
Method to remove the connection from the transaction.
|
static void |
setConnection(Connection connection)
Method to set connection.
|
void |
setRollbacked(boolean rollbacked)
Method to set whether this transaction has been rollbacked or not.
|
void |
setStarted(boolean started)
Method to set whether a transaction is started or not.
|
public void pushTransaction()
DatabaseTransactionpushTransaction in interface DatabaseTransactionpublic void popTransaction()
DatabaseTransactionpopTransaction in interface DatabaseTransactionpublic boolean isStarted()
DatabaseTransactionisStarted in interface DatabaseTransactionpublic void setStarted(boolean started)
DatabaseTransactionsetStarted in interface DatabaseTransactionstarted - whether a transaction is started or not.public static JDBCDatabaseTransaction.ManagedRegistryConnection getConnection()
public static void setConnection(Connection connection)
connection - the connection.public static void removeConnection()
public void incNestedDepth()
DatabaseTransactionincNestedDepth in interface DatabaseTransactionpublic void decNestedDepth()
DatabaseTransactiondecNestedDepth in interface DatabaseTransactionpublic int getNestedDepth()
DatabaseTransactiongetNestedDepth in interface DatabaseTransactionpublic boolean isRollbacked()
DatabaseTransactionisRollbacked in interface DatabaseTransactionpublic void setRollbacked(boolean rollbacked)
DatabaseTransactionsetRollbacked in interface DatabaseTransactionrollbacked - whether this transaction has been rollbacked or not.public static JDBCDatabaseTransaction.ManagedRegistryConnection getManagedRegistryConnection(Connection conn)
conn - un-managed connection.Copyright © 2016 WSO2 Inc. All Rights Reserved.