Search in sources :

Example 1 with AtomikosDataSourceBean

use of com.atomikos.jdbc.AtomikosDataSourceBean in project mybatis.flying by limeng32.

the class DataSourceConfig method dataSource2.

@Bean("dataSource2")
public DataSource dataSource2() {
    AtomikosDataSourceBean ds = new AtomikosDataSourceBean();
    ds.setXaDataSource(xaDataSource2());
    ds.setUniqueResourceName("testdb2");
    ds.setMinPoolSize(1);
    ds.setMaxPoolSize(3);
    ds.setMaxIdleTime(60);
    return ds;
}
Also used : AtomikosDataSourceBean(com.atomikos.jdbc.AtomikosDataSourceBean) AtomikosDataSourceBean(com.atomikos.jdbc.AtomikosDataSourceBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with AtomikosDataSourceBean

use of com.atomikos.jdbc.AtomikosDataSourceBean in project mybatis.flying by limeng32.

the class DataSourceConfig method dataSource1.

@Bean("dataSource1")
@Primary
public AtomikosDataSourceBean dataSource1() {
    AtomikosDataSourceBean ds = new AtomikosDataSourceBean();
    ds.setXaDataSource(xaDataSource1());
    ds.setUniqueResourceName("testdb");
    ds.setMinPoolSize(1);
    ds.setMaxPoolSize(3);
    ds.setMaxIdleTime(60);
    return ds;
}
Also used : AtomikosDataSourceBean(com.atomikos.jdbc.AtomikosDataSourceBean) Primary(org.springframework.context.annotation.Primary) AtomikosDataSourceBean(com.atomikos.jdbc.AtomikosDataSourceBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

AtomikosDataSourceBean (com.atomikos.jdbc.AtomikosDataSourceBean)2 Bean (org.springframework.context.annotation.Bean)2 Primary (org.springframework.context.annotation.Primary)1