|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbitronix.tm.BitronixTransactionManager
public class BitronixTransactionManager
Implementation of TransactionManager and UserTransaction.
| Constructor Summary | |
|---|---|
BitronixTransactionManager()
Create the BitronixTransactionManager. |
|
| Method Summary | |
|---|---|
void |
begin()
Start a new transaction and bind the context to the calling thread. |
void |
commit()
|
void |
dumpTransactionContexts()
Dump an overview of all running transactions as debug logs. |
BitronixTransaction |
getCurrentTransaction()
Get the transaction currently registered on the current thread context. |
Map |
getInFlightTransactions()
Return all in-flight transactions. |
long |
getOldestInFlightTransactionTimestamp()
Return the timestamp of the oldest in-flight transaction. |
Reference |
getReference()
BitronixTransactionManager can only have a single instance per JVM so this method always returns a reference with no special information to find back the sole instance. |
int |
getStatus()
|
Transaction |
getTransaction()
|
void |
resume(Transaction transaction)
|
void |
rollback()
|
void |
setRollbackOnly()
|
void |
setTransactionTimeout(int seconds)
|
void |
shutdown()
Shut down the transaction manager and release all resources held by it. |
Transaction |
suspend()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BitronixTransactionManager()
BitronixTransactionManager. Open the journal, load resources and perform recovery
synchronously. The recovery service then gets scheduled for background recovery.
| Method Detail |
|---|
public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerbegin in interface UserTransactionNotSupportedException - if a transaction is already bound to the calling thread.
SystemException - if the transaction manager is shutting down.
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
commit in interface TransactionManagercommit in interface UserTransactionRollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException
public void rollback()
throws IllegalStateException,
SecurityException,
SystemException
rollback in interface TransactionManagerrollback in interface UserTransactionIllegalStateException
SecurityException
SystemException
public int getStatus()
throws SystemException
getStatus in interface TransactionManagergetStatus in interface UserTransactionSystemException
public Transaction getTransaction()
throws SystemException
getTransaction in interface TransactionManagerSystemException
public void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagersetRollbackOnly in interface UserTransactionIllegalStateException
SystemException
public void setTransactionTimeout(int seconds)
throws SystemException
setTransactionTimeout in interface TransactionManagersetTransactionTimeout in interface UserTransactionSystemException
public Transaction suspend()
throws SystemException
suspend in interface TransactionManagerSystemException
public void resume(Transaction transaction)
throws InvalidTransactionException,
IllegalStateException,
SystemException
resume in interface TransactionManagerInvalidTransactionException
IllegalStateException
SystemException
public Reference getReference()
throws NamingException
getReference in interface ReferenceableNamingExceptionpublic Map getInFlightTransactions()
BitronixTransaction objects using Uid as key and BitronixTransaction as value.public long getOldestInFlightTransactionTimestamp()
public BitronixTransaction getCurrentTransaction()
public void dumpTransactionContexts()
public void shutdown()
This call will also close the resources pools registered by the ResourceLoader
like JMS and JDBC pools. The manually created ones are left untouched.
The Transaction Manager will wait during a configurable graceful period before forcibly killing active transactions.
After this method is called, attempts to create new transactions (via calls toTransactionManager.begin()) will be rejected with a SystemException.
shutdown in interface ServiceConfiguration.getGracefulShutdownInterval()public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||