|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.util.sql.TransactionManager
public final class TransactionManager
Class to manage transactions
| Method Summary | |
|---|---|
static void |
beginTransaction(Plugin plugin)
Begin a transaction for the current thread using the pool of a specific plugin with the default transaction isolation. |
static void |
beginTransaction(Plugin plugin,
int nTransactionIsolation)
Begin a transaction for the current thread using the pool of a specific plugin |
static void |
commitTransaction(Plugin plugin)
Commit the transaction associated to the pool of a given plugin. |
static MultiPluginTransaction |
getCurrentTransaction(Plugin plugin)
Get the current transaction for the pool of a given plugin. |
static void |
rollBack(Plugin plugin)
Roll back a transaction associated to the pool of a given plugin. |
static void |
rollBack(Plugin plugin,
Exception e)
Roll back a transaction associated to the pool of a given plugin with an exception. |
static void |
rollBackEveryTransaction()
Roll back every transactions opened by the current thread. |
static void |
rollBackEveryTransaction(Throwable e)
Roll back every transactions opened by the current thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void beginTransaction(Plugin plugin)
Connection.TRANSACTION_READ_COMMITTED.
plugin - The plugin to use the pool of, or null to use the default
pool.
public static void beginTransaction(Plugin plugin,
int nTransactionIsolation)
plugin - The plugin to use the pool of, or null to use the default
pool.nTransactionIsolation - The transaction isolation. View
Connection.setTransactionIsolation(int) to view the
different available transaction isolations.public static MultiPluginTransaction getCurrentTransaction(Plugin plugin)
plugin - The plugin to use the pool of, or null to use the default
pool.
public static void commitTransaction(Plugin plugin)
plugin - The plugin associated to the pool to commit the transaction
of, or null to use the default pool.public static void rollBack(Plugin plugin)
plugin - The plugin associated to the pool to roll back the
transaction of, or null to use the default pool.
public static void rollBack(Plugin plugin,
Exception e)
plugin - The plugin associated to the pool to roll back the
transaction of, or null to use the default pool.e - The exception to associates with the roll back.public static void rollBackEveryTransaction()
public static void rollBackEveryTransaction(Throwable e)
e - The exception that occurs and that may have prevent transaction
from being properly closed (committed or roll backed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||