|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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)
Attach the current calling Thread to the given Xid . |
int |
commitXAResource(String xatx)
administrator recovery action: Commit. |
void |
detachTransaction()
Detach the current Thread of the running Transaction. |
void |
doStart()
Start the Service Initialization of the service is already done. |
void |
doStop()
Stop the transaction service. |
int |
forgetXAResource(String xatx)
administrator recovery action: forget |
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. |
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)
administrator recovery action: rollback |
void |
setJmxService(JmxService jmxService)
|
void |
setRegistryService(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 ServiceException
doStart
in class AbsServiceImpl
ServiceException
- if service start failspublic void doStop() throws ServiceException
doStop
in class AbsServiceImpl
ServiceException
- if the service stop failspublic TransactionManager getTransactionManager()
getTransactionManager
in interface TransactionService
public XATerminator getXATerminator() throws XAException
getXATerminator
in interface TransactionService
XAException
public UserTransaction getUserTransaction()
getUserTransaction
in interface TransactionService
public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
getTransactionSynchronizationRegistry
in interface TransactionService
public void startResourceManagerRecovery() throws XAException
startResourceManagerRecovery
in interface TransactionService
XAException
public int getTimeout()
public void setTimeout(int t)
setTimeout
in interface TransactionService
t
- 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
Thread
to the given Xid
.
attachTransaction
in interface TransactionService
xid
- Transaction id.timeout
- Transaction timeout.
NotSupportedException
- if the TM cannot attach the given Xid
.
SystemException
- if the TM cannot attach the given Xid
.public void detachTransaction()
Thread
of the running Transaction.
detachTransaction
in interface TransactionService
public void setJmxService(JmxService jmxService)
jmxService
- the jmxService to setpublic void setRegistryService(RegistryService registry)
registry
- the registry service to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |