All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.onetwo.common.ds.TransactionManagerFactoryBean Maven / Gradle / Ivy

package org.onetwo.common.ds;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.transaction.PlatformTransactionManager;

/**
 * @author weishao zeng
 * 
*/ public class TransactionManagerFactoryBean implements FactoryBean { private TransactionManagerAwareDataSource dataSource; public TransactionManagerFactoryBean(TransactionManagerAwareDataSource dataSource) { super(); this.dataSource = dataSource; } @Override public PlatformTransactionManager getObject() throws Exception { return dataSource.getTransactionManager(); } @Override public Class getObjectType() { return PlatformTransactionManager.class; } @Override public boolean isSingleton() { return true; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy