|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
org.objectweb.jonas.service.AbsServiceImpl
org.objectweb.jonas.jtm.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 | |
---|---|
static String |
SERVICE_NAME
Service name as used to label configuration properties |
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.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)
|
void |
detachTransaction()
Detach the current Thread of the running Transaction. |
void |
doInit(Context ctx)
Init the Service. |
void |
doStart()
Start the Service Initialization of the service is already done. |
void |
doStop()
Stop the transaction service Not already implementated |
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 |
org.objectweb.jotm.Current |
getCurrent()
Gets the Current object instance |
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 rollebacked transactions number |
org.objectweb.jotm.TransactionFactory |
getTransactionFactory()
Gets the TransactionFactory object (JTM factory) |
org.objectweb.transaction.jta.TransactionManager |
getTransactionManager()
Gets the TransactionManager object instance |
UserTransaction |
getUserTransaction()
Gets the UserTransaction object instance |
void |
resetAllTxTotalCounters()
Reset all transaction counters |
int |
rollbackXAResource(String xatx)
|
void |
setTimeout(int t)
Sets the default transaction timeout and register Current in JNDI |
Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl |
---|
getDomainName, getJonasServerName, getName, init, isStarted, setName, start, stop |
Methods inherited from class org.objectweb.jonas.management.reconfig.emitter.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, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jonas.service.Service |
---|
getName, init, isStarted, setName, start, stop |
Field Detail |
---|
public static final String SERVICE_NAME
Constructor Detail |
---|
public JOTMTransactionService()
Method Detail |
---|
public void doInit(Context ctx) throws ServiceException
doInit
in class AbsServiceImpl
ctx
- naming context containing configuration parameters
ServiceException
- if service initialization failespublic 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 org.objectweb.jotm.Current getCurrent()
getCurrent
in interface TransactionService
public org.objectweb.transaction.jta.TransactionManager getTransactionManager()
getTransactionManager
in interface TransactionService
public UserTransaction getUserTransaction()
getUserTransaction
in interface TransactionService
public org.objectweb.jotm.TransactionFactory getTransactionFactory()
getTransactionFactory
in interface TransactionService
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |