|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.tm.jotm.JOTMTransactionService
public class JOTMTransactionService
Transaction Service implementation. This singleton class must exist in each jonas server. This class manages a unique Current object that implements both TransactionManager and UserTransaction interfaces.
| Field Summary | |
|---|---|
protected TransactionSynchronizationRegistry |
tsr
TransactionSynchronizationRegistry object, to be shared by all components. |
| Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
|---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| Constructor Summary | |
|---|---|
JOTMTransactionService()
|
|
| Method Summary | |
|---|---|
void |
attachTransaction(Xid xid,
long timeout)
|
int |
commitXAResource(String xatx)
|
void |
detachTransaction()
|
void |
doStart()
Start the Service Initialization of the service is already done. |
void |
doStop()
Stop the transaction service. |
int |
forgetXAResource(String xatx)
|
String[] |
getAllActiveTx()
Get all currently executing transactions. |
Xid[] |
getAllActiveXids()
Get all currently executing Xids. |
String[] |
getAllRecoveryTx()
Get all transactions that require administrator recovery action. |
String[] |
getAllXAResource(String xtx)
Get all XAResoures of a transaction that require administrator recovery action. |
int |
getTimeout()
|
int |
getTotalBegunTransactions()
Get begun transactions number. |
int |
getTotalCommittedTransactions()
Get committed transactions number. |
int |
getTotalCurrentTransactions()
Get current transactions number. |
int |
getTotalExpiredTransactions()
Get expired transactions number. |
int |
getTotalRolledbackTransactions()
Get rolled back transactions number. |
org.ow2.jonas.tm.TransactionManager |
getTransactionManager()
Gets the TransactionManager object instance. |
TransactionSynchronizationRegistry |
getTransactionSynchronizationRegistry()
Gets the TransactionSynchronizationRegistry object instance. |
UserTransaction |
getUserTransaction()
Gets the UserTransaction object instance. |
XATerminator |
getXATerminator()
Gets the inflow transaction object that represents the transaction context of the calling thread. |
void |
resetAllTxTotalCounters()
Reset all transaction counters. |
int |
rollbackXAResource(String xatx)
|
void |
setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
|
void |
setRegistryService(org.ow2.jonas.registry.RegistryService registry)
|
void |
setRemote(boolean remote)
|
void |
setTimeout(int t)
Sets the default transaction timeout and register Current in JNDI. |
void |
startResourceManagerRecovery()
Start Resource Manager Recovery. |
| Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
|---|
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
| Methods inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
|---|
initLogger, sendReconfigNotification, sendSaveNotification |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
|---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ow2.jonas.service.Service |
|---|
getName, init, isStarted, setName, start, stop |
| Field Detail |
|---|
protected TransactionSynchronizationRegistry tsr
| Constructor Detail |
|---|
public JOTMTransactionService()
| Method Detail |
|---|
public void setRemote(boolean remote)
remote - Use a remote TransactionManager ?
public void doStart()
throws org.ow2.jonas.service.ServiceException
doStart in class org.ow2.jonas.lib.service.AbsServiceImplorg.ow2.jonas.service.ServiceException - if service start fails
public void doStop()
throws org.ow2.jonas.service.ServiceException
doStop in class org.ow2.jonas.lib.service.AbsServiceImplorg.ow2.jonas.service.ServiceException - if the service stop failspublic org.ow2.jonas.tm.TransactionManager getTransactionManager()
getTransactionManager in interface org.ow2.jonas.tm.TransactionService
public XATerminator getXATerminator()
throws XAException
getXATerminator in interface org.ow2.jonas.tm.TransactionServiceXAExceptionpublic UserTransaction getUserTransaction()
getUserTransaction in interface org.ow2.jonas.tm.TransactionServicepublic TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
getTransactionSynchronizationRegistry in interface org.ow2.jonas.tm.TransactionService
public void startResourceManagerRecovery()
throws XAException
startResourceManagerRecovery in interface org.ow2.jonas.tm.TransactionServiceXAExceptionpublic int getTimeout()
public void setTimeout(int t)
setTimeout in interface org.ow2.jonas.tm.TransactionServicet - new value for time-outpublic int getTotalBegunTransactions()
public int getTotalCommittedTransactions()
public int getTotalCurrentTransactions()
public int getTotalExpiredTransactions()
public int getTotalRolledbackTransactions()
public void resetAllTxTotalCounters()
public Xid[] getAllActiveXids()
public String[] getAllActiveTx()
public String[] getAllRecoveryTx()
public String[] getAllXAResource(String xtx)
public int commitXAResource(String xatx)
public int rollbackXAResource(String xatx)
public int forgetXAResource(String xatx)
public void attachTransaction(Xid xid,
long timeout)
throws NotSupportedException,
SystemException
attachTransaction in interface org.ow2.jonas.tm.TransactionServiceNotSupportedException
SystemExceptionpublic void detachTransaction()
detachTransaction in interface org.ow2.jonas.tm.TransactionServicepublic void setJmxService(org.ow2.jonas.jmx.JmxService jmxService)
jmxService - the jmxService to setpublic void setRegistryService(org.ow2.jonas.registry.RegistryService registry)
registry - the registry service to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||