public class SQLTransaction extends Base
Modifier and Type | Method and Description |
---|---|
static void | commitTransaction(DSTransaction dsTransaction) Commit the current transaction |
static void | commitTransaction(RPCManager rpcManager) Commit the current transaction |
static void | endTransaction(DSTransaction dsTransaction) End the current transaction. |
static void | endTransaction(RPCManager rpcManager) End the current transaction. |
static java.sql.Connection | getConnection(DSTransaction dsTransaction) Returns the connection participating in the transaction. |
static java.sql.Connection | getConnection(RPCManager rpcManager) Returns the connection participating in the transaction. |
static boolean | isConnectionAvailable(DSTransaction dsTransaction, java.lang.String dbName) Checks if a SQL connection object is available for the specified DSTransaction . |
static boolean | isConnectionAvailable(RPCManager rpcManager, java.lang.String dbName) Checks if a SQL connection object is available for the specified DSTransaction . |
static void | rollbackTransaction(DSTransaction dsTransaction) Rollback the current transaction |
static void | rollbackTransaction(RPCManager rpcManager) Rollback the current transaction |
static void | setAutoEndTransactions(boolean autoEnd) Sets automatic transaction end support. |
static boolean | startTransaction(DSTransaction dsTransaction) Starts a new database transaction. |
static boolean | startTransaction(RPCManager rpcManager) Starts a new database transaction. |
public static void setAutoEndTransactions(boolean autoEnd)
autoEnd
- If true, switches on auto-end supportpublic static boolean startTransaction(RPCManager rpcManager) throws java.lang.Exception
Please note that if you are manually handling the transaction you should have set it on the RPCManager
before calling this method or use SQLTransaction.startTransaction(DSTransaction)
instead.
java.lang.Exception
public static boolean startTransaction(DSTransaction dsTransaction) throws java.lang.Exception
java.lang.Exception
public static java.sql.Connection getConnection(RPCManager rpcManager) throws java.lang.Exception
Please note that if you are manually handling the transaction you should have set it on the RPCManager
before calling this method or use SQLTransaction.getConnection(DSTransaction)
instead.
java.lang.Exception
- if there is a configuration error with one of the underlying datasourcespublic static java.sql.Connection getConnection(DSTransaction dsTransaction) throws java.lang.Exception
java.lang.Exception
- if there is a configuration error with one of the underlying datasourcespublic static void rollbackTransaction(RPCManager rpcManager) throws java.lang.Exception
Please note that if you are manually handling the transaction you should have set it on the RPCManager
before calling this method or use SQLTransaction.rollbackTransaction(DSTransaction)
instead.
java.lang.Exception
- if problems were found rolling back the transactionpublic static void rollbackTransaction(DSTransaction dsTransaction) throws java.lang.Exception
java.lang.Exception
- if problems were found rolling back the transactionpublic static void commitTransaction(RPCManager rpcManager) throws java.lang.Exception
Please note that if you are manually handling the transaction you should have set it on the RPCManager
before calling this method or use SQLTransaction.commitTransaction(DSTransaction)
instead.
java.lang.Exception
- if problems were found committing the transactionpublic static void commitTransaction(DSTransaction dsTransaction) throws java.lang.Exception
java.lang.Exception
- if problems were found committing the transactionpublic static boolean isConnectionAvailable(RPCManager rpcManager, java.lang.String dbName)
DSTransaction
. Please note that if you are manually handling the transaction you should have set it on the RPCManager
before calling this method or use SQLTransaction.isConnectionAvailable(DSTransaction, String)
instead.
rpcManager
- the RPCManager to check for a SQL connection on.dbName
- the name of the database.public static boolean isConnectionAvailable(DSTransaction dsTransaction, java.lang.String dbName)
DSTransaction
.dsTransaction
- the DSTransaction to check for a SQL connection on.dbName
- the name of the database.public static void endTransaction(RPCManager rpcManager) throws java.lang.Exception
Please note that if you are manually handling the transaction you should have set it on the RPCManager
before calling this method or use SQLTransaction.endTransaction(DSTransaction, String)
instead.
java.lang.Exception
- if problems were found ending the transactionpublic static void endTransaction(DSTransaction dsTransaction) throws java.lang.Exception
java.lang.Exception
- if problems were found ending the transaction