com.googlecode.jpattern.service.transaction
Class SpringTransactionManager

java.lang.Object
  extended by com.googlecode.jpattern.service.transaction.ATransactionManager
      extended by com.googlecode.jpattern.service.transaction.SpringTransactionManager

public class SpringTransactionManager
extends ATransactionManager

Author:
Francesco Cina' 28 Mar 2011 Manage of the transaction using the PlatformTransactionManager implementation of Spring

Field Summary
protected  org.springframework.transaction.TransactionStatus transactionStatus
           
 
Constructor Summary
SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager platformTransactionManager)
           
 
Method Summary
 boolean beginTransaction(IProvider provider)
          Begin of a new transaction
protected  void commit(IProvider provider)
           
 boolean isClosed()
           
 boolean isRollbackOnly()
           
protected  void rollback(IProvider provider)
           
 void setForceNewTransaction(boolean forceNewTransaction)
           
 void setForceReadOnly(boolean forceReadOnly)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionStatus

protected org.springframework.transaction.TransactionStatus transactionStatus
Constructor Detail

SpringTransactionManager

public SpringTransactionManager(org.springframework.transaction.PlatformTransactionManager platformTransactionManager)
Method Detail

setForceReadOnly

public void setForceReadOnly(boolean forceReadOnly)
Specified by:
setForceReadOnly in class ATransactionManager

setForceNewTransaction

public void setForceNewTransaction(boolean forceNewTransaction)
Specified by:
setForceNewTransaction in class ATransactionManager

beginTransaction

public boolean beginTransaction(IProvider provider)
Description copied from class: ATransactionManager
Begin of a new transaction

Specified by:
beginTransaction in class ATransactionManager
Parameters:
provider - the IProvider to use
Returns:
true if a new transaction is created; false if an existing transaction is found

commit

protected void commit(IProvider provider)
Specified by:
commit in class ATransactionManager

rollback

protected void rollback(IProvider provider)
Specified by:
rollback in class ATransactionManager

isClosed

public boolean isClosed()
Specified by:
isClosed in class ATransactionManager

isRollbackOnly

public boolean isRollbackOnly()
Specified by:
isRollbackOnly in class ATransactionManager


Copyright © 2011. All Rights Reserved.