org.apache.openejb.spring
Class SpringBeanTransactionPolicy

java.lang.Object
  extended by org.apache.openejb.spring.SpringTransactionPolicy
      extended by org.apache.openejb.spring.SpringBeanTransactionPolicy
All Implemented Interfaces:
BeanTransactionPolicy, TransactionPolicy

public class SpringBeanTransactionPolicy
extends SpringTransactionPolicy
implements BeanTransactionPolicy


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.openejb.core.transaction.BeanTransactionPolicy
BeanTransactionPolicy.SuspendedTransaction
 
Nested classes/interfaces inherited from interface org.apache.openejb.core.transaction.TransactionPolicy
TransactionPolicy.TransactionSynchronization
 
Field Summary
 
Fields inherited from class org.apache.openejb.spring.SpringTransactionPolicy
transactionManager, type
 
Constructor Summary
SpringBeanTransactionPolicy(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 
Method Summary
protected  org.springframework.transaction.support.DefaultTransactionStatus getTransactionStatus()
           
 UserTransaction getUserTransaction()
          Gets the UserTransaction the bean uses to manage the transaction.
 void resumeUserTransaction(BeanTransactionPolicy.SuspendedTransaction suspendedTransaction)
          Resumes the transaction contained in the suspended transaction token.
 BeanTransactionPolicy.SuspendedTransaction suspendUserTransaction()
          Syspends the bean managed transaction.
 
Methods inherited from class org.apache.openejb.spring.SpringTransactionPolicy
commit, enlistResource, getResource, getTransactionType, isClientTransaction, isNewTransaction, isRollbackOnly, isTransactionActive, putResource, registerSynchronization, removeResource, setRollbackOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openejb.core.transaction.TransactionPolicy
commit, enlistResource, getResource, getTransactionType, isClientTransaction, isNewTransaction, isRollbackOnly, isTransactionActive, putResource, registerSynchronization, removeResource, setRollbackOnly
 

Constructor Detail

SpringBeanTransactionPolicy

public SpringBeanTransactionPolicy(org.springframework.transaction.PlatformTransactionManager transactionManager)
Method Detail

getTransactionStatus

protected org.springframework.transaction.support.DefaultTransactionStatus getTransactionStatus()
Overrides:
getTransactionStatus in class SpringTransactionPolicy

suspendUserTransaction

public BeanTransactionPolicy.SuspendedTransaction suspendUserTransaction()
                                                                  throws SystemException
Description copied from interface: BeanTransactionPolicy
Syspends the bean managed transaction. This is mainly used by stateful session beans which are required to maintain the bean managed transaction between calls. After this method completes the transaction will be suspended or if there is a problem it will be rolled back.

Specified by:
suspendUserTransaction in interface BeanTransactionPolicy
Returns:
the syspended transaction token or null if no transaction was active
Throws:
SystemException - if there was a problem suspending the transaction

resumeUserTransaction

public void resumeUserTransaction(BeanTransactionPolicy.SuspendedTransaction suspendedTransaction)
                           throws SystemException
Description copied from interface: BeanTransactionPolicy
Resumes the transaction contained in the suspended transaction token. After this method completes the transaction will be resumes or if there is a problem it will be rolled back.

Specified by:
resumeUserTransaction in interface BeanTransactionPolicy
Parameters:
suspendedTransaction - the transaction to resume; not null
Throws:
SystemException - if there was a problem resuming the transaction

getUserTransaction

public UserTransaction getUserTransaction()
Description copied from interface: BeanTransactionPolicy
Gets the UserTransaction the bean uses to manage the transaction.

Specified by:
getUserTransaction in interface BeanTransactionPolicy
Returns:
the UserTransaction the bean uses to manage the transaction


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.