【Java开源代码栏目提醒】:网学会员,鉴于大家对Java开源代码十分关注,论文会员在此为大家搜集整理了“TxManagerFactory.java”一文,供大家参考学习!
package com.cownew.PIS.framework.server.TxMgr;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import com.cownew.PIS.framework.server.helper.ThreadVariableManager;
public class TxManagerFactory
{
public static PlatformTransactionManager buildTxManager()
{
DataSourceTransactionManager txMgr = new DataSourceTransactionManager();
txMgr.setDataSource(ThreadVariableManager.getInstance().getDataSource());
txMgr.afterPropertiesSet();
return txMgr;
}
}