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

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

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:

commit

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

rollback

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


Copyright © 2011. All Rights Reserved.