public class DefaultTransactionContext extends Object implements HGTransactionContext
A default implementation of HGTransactionContext using a stack of currently
active transactions. Transactions in the stack are in a parent-child relationship where
the bottom doesn't have any parent.
| Constructor and Description |
|---|
DefaultTransactionContext(HGTransactionManager manager) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction(HGTransactionConfig config) |
void |
endAll(boolean success) |
void |
endTransaction(boolean success) |
HGTransaction |
getCurrent()
Return the currently active transaction or
null if there is
no such transaction. |
HGTransactionManager |
getManager() |
public DefaultTransactionContext(HGTransactionManager manager)
public HGTransactionManager getManager()
getManager in interface HGTransactionContextpublic HGTransaction getCurrent()
Return the currently active transaction or null if there is
no such transaction.
getCurrent in interface HGTransactionContextpublic void beginTransaction(HGTransactionConfig config)
beginTransaction in interface HGTransactionContextpublic void endTransaction(boolean success)
throws HGTransactionException
endTransaction in interface HGTransactionContextHGTransactionExceptionpublic void endAll(boolean success)
throws HGTransactionException
endAll in interface HGTransactionContextHGTransactionExceptionCopyright © 2015. All rights reserved.