public class KunderaJTAUserTransaction extends Object implements UserTransaction, Referenceable, Serializable
UserTransaction
This needs to hooked up with initial context for use of Kundera's
commit/rollback handling.| Modifier and Type | Field and Description |
|---|---|
private static KunderaJTAUserTransaction |
currentTx
The current tx.
|
private static Integer |
DEFAULT_TIME_OUT
The Constant DEFAULT_TIME_OUT.
|
private static org.slf4j.Logger |
log
The Constant log.
|
private static ThreadLocal<KunderaTransaction> |
threadLocal
The thread local.
|
private static ThreadLocal<Integer> |
timerThead
The timer thead.
|
| Constructor and Description |
|---|
KunderaJTAUserTransaction()
Instantiates a new kundera jta user transaction.
|
| Modifier and Type | Method and Description |
|---|---|
void |
begin() |
void |
commit() |
static KunderaJTAUserTransaction |
getCurrentTx()
Gets the current tx.
|
Reference |
getReference() |
int |
getStatus() |
int |
getTransactionTimeout()
Returns transaction time out.
|
void |
rollback() |
void |
setImplementor(ResourceManager implementor)
Links referenced resource to current transaction thread.
|
void |
setRollbackOnly() |
void |
setTransactionTimeout(int timeout) |
private static transient ThreadLocal<KunderaTransaction> threadLocal
private static transient ThreadLocal<Integer> timerThead
private static final Integer DEFAULT_TIME_OUT
private static transient KunderaJTAUserTransaction currentTx
private static final org.slf4j.Logger log
public KunderaJTAUserTransaction()
public static KunderaJTAUserTransaction getCurrentTx()
public void begin()
throws NotSupportedException,
SystemException
begin in interface UserTransactionNotSupportedExceptionSystemExceptionpublic void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
commit in interface UserTransactionRollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionSecurityExceptionIllegalStateExceptionSystemExceptionpublic int getStatus()
throws SystemException
getStatus in interface UserTransactionSystemExceptionpublic void rollback()
throws IllegalStateException,
SecurityException,
SystemException
rollback in interface UserTransactionIllegalStateExceptionSecurityExceptionSystemExceptionpublic void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface UserTransactionIllegalStateExceptionSystemExceptionpublic void setTransactionTimeout(int timeout)
throws SystemException
setTransactionTimeout in interface UserTransactionSystemExceptionpublic int getTransactionTimeout()
public void setImplementor(ResourceManager implementor)
implementor - resource implementor.public Reference getReference() throws NamingException
getReference in interface ReferenceableNamingExceptionCopyright © 2015. All Rights Reserved.