org.objectweb.jonas.jtm
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.
 org.objectweb.jotm.Current getCurrent()
          Gets the Current object.
 org.objectweb.jotm.TransactionFactory getTransactionFactory()
           
 org.objectweb.transaction.jta.TransactionManager getTransactionManager()
          Gets the TransactionManager.
 UserTransaction getUserTransaction()
           
 void setTimeout(int t)
          Sets the default transaction timeout.
 
Methods inherited from interface org.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Method Detail

getCurrent

org.objectweb.jotm.Current getCurrent()
Gets the Current object.


getTransactionManager

org.objectweb.transaction.jta.TransactionManager getTransactionManager()
Gets the TransactionManager.


getUserTransaction

UserTransaction getUserTransaction()
Returns:
Returns the UserTransaction object.

getTransactionFactory

org.objectweb.jotm.TransactionFactory getTransactionFactory()
Returns:
Returns the TransactionFactory object (JTM factory).

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 © 2007 OW2 Consortium. All Rights Reserved.