org.ow2.easybeans.component.itf
Interface TMComponent

All Superinterfaces:
EZBComponent

public interface TMComponent
extends EZBComponent

Defines the interface for a TM provider.

Author:
Florent Benoit

Field Summary
static String JNDI_NAME
          JNDI name of the transaction manager.
 
Method Summary
 void begin(Xid xid)
          Creates a new inflow transaction and associates it with the current thread.
 void begin(Xid xid, long timeout)
          Creates a new inflow transaction and associates it with the current thread.
 void clearThreadTx()
          Clear transaction from this thread if not known.
 TransactionManager getTransactionManager()
          Gets the transaction manager object.
 javax.resource.spi.XATerminator getXATerminator()
           
 void setTimeout(int timeout)
          Set the Transaction Timeout.
 
Methods inherited from interface org.ow2.easybeans.component.api.EZBComponent
init, start, stop
 

Field Detail

JNDI_NAME

static final String JNDI_NAME
JNDI name of the transaction manager.

See Also:
Constant Field Values
Method Detail

getTransactionManager

TransactionManager getTransactionManager()
Gets the transaction manager object.

Returns:
instance of the transaction manager

setTimeout

void setTimeout(int timeout)
Set the Transaction Timeout.

Parameters:
timeout - Timeout (in seconds)

getXATerminator

javax.resource.spi.XATerminator getXATerminator()
                                                throws XAException
Returns:
the XA terminator.
Throws:
XAException - if the terminator is not available

begin

void begin(Xid xid)
           throws NotSupportedException,
                  SystemException
Creates a new inflow transaction and associates it with the current thread.

Parameters:
xid - Xid of the inflow transaction.
Throws:
NotSupportedException - Thrown if the thread is already associated with a transaction. (nested transaction are not supported)
SystemException - Thrown if the transaction manager encounters an unexpected error condition

begin

void begin(Xid xid,
           long timeout)
           throws NotSupportedException,
                  SystemException
Creates a new inflow transaction and associates it with the current thread.

Parameters:
xid - Xid of the inflow transaction.
timeout - value of the timeout (in seconds). If the value is less than or equal to zero, the value will be set to the default value.
Throws:
NotSupportedException - Thrown if the thread is already associated with a transaction. (nested transaction are not supported)
SystemException - Thrown if the transaction manager encounters an unexpected error condition

clearThreadTx

void clearThreadTx()
Clear transaction from this thread if not known. Useful when another thread completes the current thread's transaction



Copyright © 2006-2012 OW2 Consortium. All Rights Reserved.