com.ibm.jbatch.spi.services
Interface TransactionManagerAdapter

All Known Implementing Classes:
DefaultNonTransactionalManager, JTAUserTransactionAdapter

public interface TransactionManagerAdapter

We have this interface so that we do not try to load the Java EE UserTransaction in an SE environment


Method Summary
 void begin()
          Create a new transaction and associate it with the current thread.
 void commit()
          Complete the transaction associated with the current thread.
 int getStatus()
          Obtain the status of the transaction associated with the current thread.
 void rollback()
          Roll back the transaction associated with the current thread.
 void setRollbackOnly()
          Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.
 void setTransactionTimeout(int arg0)
          Modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method.
 

Method Detail

begin

void begin()
           throws Exception
Create a new transaction and associate it with the current thread.

Throws:
Exception - Thrown if the transaction manager encounters an unexpected error condition.

commit

void commit()
            throws Exception
Complete the transaction associated with the current thread.

Throws:
Exception - Thrown if the transaction manager encounters an unexpected error condition.

getStatus

int getStatus()
              throws Exception
Obtain the status of the transaction associated with the current thread.

Returns:
The transaction status.
Throws:
Exception - Thrown if the transaction manager encounters an unexpected error condition.

rollback

void rollback()
              throws Exception
Roll back the transaction associated with the current thread. When this method completes, the thread becomes associated with no transaction.

Throws:
Exception - Thrown if the transaction manager encounters an unexpected error condition.

setRollbackOnly

void setRollbackOnly()
                     throws Exception
Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.

Throws:
Exception - Thrown if the transaction manager encounters an unexpected error condition.

setTransactionTimeout

void setTransactionTimeout(int arg0)
                           throws Exception
Modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method.

Parameters:
arg0 - seconds - The value of the timeout in seconds. If the value is zero, the transaction service restores the default value.
Throws:
Exception - Thrown if the transaction manager encounters an unexpected error condition.


Copyright © 2013. All Rights Reserved.