package com.xjrsoft.common;

import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;

//@Configuration
//public class TransactionConfig {
//
//    @Primary // 指定为主要的事务管理器
//    @Bean
//    public PlatformTransactionManager camundaTransactionManager(DataSource camundaDataSource) {
//        return new DataSourceTransactionManager(camundaDataSource);
//    }
//    
//    // 其他数据源的事务管理器
//    @Bean
//    public PlatformTransactionManager businessTransactionManager(DataSource businessDataSource) {
//        return new DataSourceTransactionManager(businessDataSource);
//    }
//}
