|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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)
Notification of termination. |
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)
Notification that some tx has been rolledback. |
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 TransactionManager
begin
in interface UserTransaction
NotSupportedException
SystemException
public void begin(int timeout) throws NotSupportedException, SystemException
NotSupportedException
SystemException
public Transaction getTransaction() throws SystemException
getTransaction
in interface TransactionManager
SystemException
TransactionManager
public void setTransactionTimeout(int seconds) throws SystemException
setTransactionTimeout
in interface TransactionManager
setTransactionTimeout
in interface UserTransaction
SystemException
TransactionManager
public int getTransactionTimeout()
public Transaction suspend() throws SystemException
suspend
in interface TransactionManager
SystemException
TransactionManager
public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException
resume
in interface TransactionManager
InvalidTransactionException
IllegalStateException
SystemException
TransactionManager
public int getStatus() throws SystemException
getStatus
in interface TransactionManager
getStatus
in interface UserTransaction
SystemException
TransactionManager
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SystemException, IllegalStateException, SecurityException
commit
in interface TransactionManager
commit
in interface UserTransaction
RollbackException
HeuristicMixedException
HeuristicRollbackException
SystemException
IllegalStateException
SecurityException
TransactionManager
public void rollback() throws IllegalStateException, SystemException, SecurityException
rollback
in interface TransactionManager
rollback
in interface UserTransaction
IllegalStateException
SystemException
SecurityException
TransactionManager
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface TransactionManager
setRollbackOnly
in interface UserTransaction
IllegalStateException
SystemException
TransactionManager
public void committed(CompositeTransaction tx)
SubTxAwareParticipant
committed
in interface SubTxAwareParticipant
tx
- The composite transaction that has terminated
locally at its node.SubTxAwareParticipant
public void rolledback(CompositeTransaction tx)
SubTxAwareParticipant
rolledback
in interface SubTxAwareParticipant
SubTxAwareParticipant
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
Referenceable.getReference()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |