org.ow2.jonas.tm
Interface TransactionService

All Superinterfaces:
Service
All Known Implementing Classes:
JOTMTransactionService

public interface TransactionService
extends Service

Transaction Service interface.


Method Summary
 void attachTransaction(Xid xid, long timeout)
          Attach the current calling Thread to the given Xid.
 void detachTransaction()
          Detach the current Thread of the running Transaction.
 TransactionManager getTransactionManager()
          Gets the TransactionManager.
 TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
           
 UserTransaction getUserTransaction()
           
 XATerminator getXATerminator()
          Gets the inflow transaction object that represents the transaction context of the calling thread.
 void setTimeout(int t)
          Sets the default transaction timeout.
 void startResourceManagerRecovery()
          Start ResourceManager Recovery
 
Methods inherited from interface org.ow2.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Method Detail

getTransactionManager

TransactionManager getTransactionManager()
Gets the TransactionManager.


getUserTransaction

UserTransaction getUserTransaction()
Returns:
Returns the UserTransaction object.

getTransactionSynchronizationRegistry

TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
Returns:
Returns the TransactionSynchronizationRegistry object.

getXATerminator

XATerminator getXATerminator()
                             throws XAException
Gets the inflow transaction object that represents the transaction context of the calling thread. If the calling thread is not associated with an inflow transaction, a null object reference is returned.

Returns:
a XATerminator handle
Throws:
XAException

startResourceManagerRecovery

void startResourceManagerRecovery()
                                  throws XAException
Start ResourceManager Recovery

Throws:
XAException

setTimeout

void setTimeout(int t)
Sets the default transaction timeout.

Parameters:
t - default transaction timeout.

attachTransaction

void attachTransaction(Xid xid,
                       long timeout)
                       throws NotSupportedException,
                              SystemException
Attach the current calling Thread to the given Xid.

Parameters:
xid - Transaction id.
timeout - Transaction timeout.
Throws:
SystemException - if the TM cannot attach the given Xid.
NotSupportedException - if the TM cannot attach the given Xid.

detachTransaction

void detachTransaction()
Detach the current Thread of the running Transaction.



Copyright © 2010 OW2 Consortium. All Rights Reserved.