Java 类org.springframework.boot.jta.atomikos.AtomikosDataSourceBean 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JtaAutoConfigurationTests.java   
@Test
public void atomikosDataSourcePoolConfiguration() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.jta.atomikos.datasource.minPoolSize:5",
            "spring.jta.atomikos.datasource.maxPoolSize:10");
    this.context.register(JtaPropertiesConfiguration.class,
            AtomikosJtaConfiguration.class, PoolConfiguration.class);
    this.context.refresh();
    AtomikosDataSourceBean dataSource = this.context
            .getBean(AtomikosDataSourceBean.class);
    assertThat(dataSource.getMinPoolSize()).isEqualTo(5);
    assertThat(dataSource.getMaxPoolSize()).isEqualTo(10);
}
项目:spring-boot-concourse    文件:JtaAutoConfigurationTests.java   
@Test
public void atomikosDataSourcePoolConfiguration() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.jta.atomikos.datasource.minPoolSize:5",
            "spring.jta.atomikos.datasource.maxPoolSize:10");
    this.context.register(JtaPropertiesConfiguration.class,
            AtomikosJtaConfiguration.class, PoolConfiguration.class);
    this.context.refresh();
    AtomikosDataSourceBean dataSource = this.context
            .getBean(AtomikosDataSourceBean.class);
    assertThat(dataSource.getMinPoolSize()).isEqualTo(5);
    assertThat(dataSource.getMaxPoolSize()).isEqualTo(10);
}
项目:contestparser    文件:JtaAutoConfigurationTests.java   
@Test
public void atomikosDataSourcePoolConfiguration() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.jta.atomikos.datasource.minPoolSize:5",
            "spring.jta.atomikos.datasource.maxPoolSize:10");
    this.context.register(JtaPropertiesConfiguration.class,
            AtomikosJtaConfiguration.class, PoolConfiguration.class);
    this.context.refresh();
    AtomikosDataSourceBean dataSource = this.context
            .getBean(AtomikosDataSourceBean.class);
    assertThat(dataSource.getMinPoolSize(), is(equalTo(5)));
    assertThat(dataSource.getMaxPoolSize(), is(equalTo(10)));
}
项目:hsweb-framework    文件:AtomikosDataSourceAutoConfiguration.java   
@Bean(initMethod = "init", destroyMethod = "destroy", value = "defaultDataSource")
@Primary
public AtomikosDataSourceBean defaultDataSource() {
    return new AtomikosDataSourceBean();
}