|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atomikos.icatch.jta.TransactionManagerImp
public class TransactionManagerImp
The JTA transaction manager implementation.
| Field Summary | |
|---|---|
static String |
JTA_PROPERTY_NAME
Transaction property name to indicate that the transaction is a JTA transaction. |
| Method Summary | |
|---|---|
void |
begin()
Create a new transaction and associate it with the current thread. |
void |
begin(int timeout)
Custom begin to guarantee a timeout value through an argument. |
void |
commit()
|
void |
committed(CompositeTransaction tx)
|
static boolean |
getDefaultSerial()
Get the default mode for new txs. |
static int |
getDefaultTimeout()
Get the default timeout value. |
Reference |
getReference()
|
int |
getStatus()
|
Transaction |
getTransaction()
|
Transaction |
getTransaction(String tid)
Retrieve an existing tx with given tid |
static TransactionManager |
getTransactionManager()
Get the installed transaction manager, if any. |
int |
getTransactionTimeout()
|
static void |
installTransactionManager(CompositeTransactionManager ctm,
boolean automaticResourceRegistration)
Install a transaction manager. |
void |
resume(Transaction tobj)
|
void |
rollback()
|
void |
rolledback(CompositeTransaction tx)
|
static void |
setDefaultSerial(boolean serial)
Set the default serial mode for new txs. |
static void |
setDefaultTimeout(int defaultTimeoutValue)
Set the default transaction timeout value. |
void |
setRollbackOnly()
|
void |
setTransactionTimeout(int seconds)
|
Transaction |
suspend()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JTA_PROPERTY_NAME
| Method Detail |
|---|
public static void setDefaultSerial(boolean serial)
serial - If true, then new txs will be set to serial mode.public static boolean getDefaultSerial()
public static void setDefaultTimeout(int defaultTimeoutValue)
defaultTimeoutValue - the default transaction timeout value in seconds.public static int getDefaultTimeout()
public static void installTransactionManager(CompositeTransactionManager ctm,
boolean automaticResourceRegistration)
ctm - The composite transaction manager to use.automaticResourceRegistration - If true, then unknown XAResource instances should lead to the
addition of a new temporary resource. If false, then unknown
resources will lead to an exception.public static TransactionManager getTransactionManager()
public Transaction getTransaction(String tid)
tid - The tid of the tx.
public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerbegin in interface UserTransactionNotSupportedException
SystemException
public void begin(int timeout)
throws NotSupportedException,
SystemException
NotSupportedException
SystemException
public Transaction getTransaction()
throws SystemException
getTransaction in interface TransactionManagerSystemExceptionTransactionManager
public void setTransactionTimeout(int seconds)
throws SystemException
setTransactionTimeout in interface TransactionManagersetTransactionTimeout in interface UserTransactionSystemExceptionTransactionManagerpublic int getTransactionTimeout()
public Transaction suspend()
throws SystemException
suspend in interface TransactionManagerSystemExceptionTransactionManager
public void resume(Transaction tobj)
throws InvalidTransactionException,
IllegalStateException,
SystemException
resume in interface TransactionManagerInvalidTransactionException
IllegalStateException
SystemExceptionTransactionManager
public int getStatus()
throws SystemException
getStatus in interface TransactionManagergetStatus in interface UserTransactionSystemExceptionTransactionManager
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SystemException,
IllegalStateException,
SecurityException
commit in interface TransactionManagercommit in interface UserTransactionRollbackException
HeuristicMixedException
HeuristicRollbackException
SystemException
IllegalStateException
SecurityExceptionTransactionManager
public void rollback()
throws IllegalStateException,
SystemException,
SecurityException
rollback in interface TransactionManagerrollback in interface UserTransactionIllegalStateException
SystemException
SecurityExceptionTransactionManager
public void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagersetRollbackOnly in interface UserTransactionIllegalStateException
SystemExceptionTransactionManagerpublic void committed(CompositeTransaction tx)
committed in interface SubTxAwareParticipantSubTxAwareParticipantpublic void rolledback(CompositeTransaction tx)
rolledback in interface SubTxAwareParticipantSubTxAwareParticipant
public Reference getReference()
throws NamingException
getReference in interface ReferenceableNamingExceptionReferenceable.getReference()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||