org.kuali.rice.core.framework.persistence.ojb
Class TransactionManagerFactory

java.lang.Object
  extended by org.kuali.rice.core.framework.persistence.ojb.TransactionManagerFactory
All Implemented Interfaces:
org.apache.ojb.broker.transaction.tm.TransactionManagerFactory

public class TransactionManagerFactory
extends Object
implements org.apache.ojb.broker.transaction.tm.TransactionManagerFactory

An implementation of an OJB TransactionManagerFactory which provides access to Workflow's JTA UserTransaction.

If the TransactionManager singleton has been set via setTransactionManager(TransactionManager) then that reference is returned, otherwise the TransactionManager is pulled from Workflow's Spring core via the SpringServiceLocator.

When accessed from outside the workflow core (i.e. embedded mode), the transaction manager singleton MUST explicitly be set - it cannot be resolved through the SpringServiceLocator.

Note: if OJB is caused to initialize DURING Spring initialization (for example, by programmatically obtaining the OJB PersistenceBrokerFactory to set the platform attribute of connection descriptors from within a bean initialized by Spring), the TransactionManager singleton MUST be set beforehand, otherwise NPE will result from attempting to traverse SpringServiceLocator as the GlobalResourceLoader will not have been initialized yet).

This TransactionManagerFactory implementation is specified in OJB via the following setting the OJB properties:

JTATransactionManagerClass=org.kuali.rice.core.database.WorkflowTransactionManagerFactory

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

Constructor Summary
TransactionManagerFactory()
           
 
Method Summary
 TransactionManager getTransactionManager()
           
static void setTransactionManager(TransactionManager transactionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionManagerFactory

public TransactionManagerFactory()
Method Detail

getTransactionManager

public TransactionManager getTransactionManager()
                                         throws org.apache.ojb.broker.transaction.tm.TransactionManagerFactoryException
Specified by:
getTransactionManager in interface org.apache.ojb.broker.transaction.tm.TransactionManagerFactory
Throws:
org.apache.ojb.broker.transaction.tm.TransactionManagerFactoryException

setTransactionManager

public static void setTransactionManager(TransactionManager transactionManager)


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.