org.beanlet.transaction
Interface TransactionContext


public interface TransactionContext

Provides access to the transaction runtime context of the beanlet instance.


Method Summary
 boolean getRollbackOnly()
          Test if the transaction has been marked for rollback only.
 UserTransaction getUserTransaction()
          Obtain the transaction demarcation interface.
 void setRollbackOnly()
          Mark the current transaction for rollback.
 

Method Detail

setRollbackOnly

void setRollbackOnly()
                     throws BeanletStateException
Mark the current transaction for rollback.

Throws:
BeanletStateException - if the current thread is not associated with a transaction.

getRollbackOnly

boolean getRollbackOnly()
                        throws BeanletStateException
Test if the transaction has been marked for rollback only.

Returns:
true if the transaction has been marked for rollback only.
Throws:
BeanletStateException - if the current thread is not associated with a transaction.

getUserTransaction

UserTransaction getUserTransaction()
                                   throws BeanletStateException
Obtain the transaction demarcation interface.

Throws:
BeanletStateException - if no user transaction has been installed.


Copyright © 2006-2012. All Rights Reserved.