org.kuali.rice.test
Class TransactionalLifecycle

java.lang.Object
  extended by org.kuali.rice.test.TransactionalLifecycle
All Implemented Interfaces:
Lifecycle

public class TransactionalLifecycle
extends Object
implements Lifecycle

A lifecycle for testing with database transactional rollback.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static String DEFAULT_TRANSACTION_MANAGER_NAME
          Name of the transaction manager to pull from the GlobalResourceLoader.
private static org.apache.log4j.Logger LOG
           
private  boolean started
           
private  org.springframework.transaction.TransactionStatus TRANSACTION_STATUS
           
private  org.springframework.transaction.PlatformTransactionManager transactionManager
           
private  String transactionManagerName
           
 
Constructor Summary
TransactionalLifecycle()
           
TransactionalLifecycle(String transactionManagerName)
           
 
Method Summary
private  org.springframework.transaction.PlatformTransactionManager getTransactionManager()
          Returns the PlatformTransactionManager configured on this lifecycle.
 boolean isStarted()
           
 void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

DEFAULT_TRANSACTION_MANAGER_NAME

public static final String DEFAULT_TRANSACTION_MANAGER_NAME
Name of the transaction manager to pull from the GlobalResourceLoader. This will most likely be a Spring bean name.

See Also:
Constant Field Values

transactionManagerName

private String transactionManagerName

transactionManager

private org.springframework.transaction.PlatformTransactionManager transactionManager

started

private boolean started

TRANSACTION_STATUS

private org.springframework.transaction.TransactionStatus TRANSACTION_STATUS
Constructor Detail

TransactionalLifecycle

public TransactionalLifecycle(String transactionManagerName)

TransactionalLifecycle

public TransactionalLifecycle()
Method Detail

setTransactionManager

public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)

getTransactionManager

private org.springframework.transaction.PlatformTransactionManager getTransactionManager()
Returns the PlatformTransactionManager configured on this lifecycle. If none defined, pulls the transaction manager out of the GlobalResourceLoader

Returns:
the transaction manager in the GlobalResourceLoader

isStarted

public boolean isStarted()
Specified by:
isStarted in interface Lifecycle

start

public void start()
           throws Exception
Specified by:
start in interface Lifecycle
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Lifecycle
Throws:
Exception


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.