@Test public void bitronixConnectionFactoryPoolConfiguration() { this.context = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(this.context, "spring.jta.bitronix.connectionfactory.minPoolSize:5", "spring.jta.bitronix.connectionfactory.maxPoolSize:10"); this.context.register(JtaPropertiesConfiguration.class, BitronixJtaConfiguration.class, PoolConfiguration.class); this.context.refresh(); PoolingConnectionFactoryBean connectionFactory = this.context .getBean(PoolingConnectionFactoryBean.class); assertThat(connectionFactory.getMinPoolSize()).isEqualTo(5); assertThat(connectionFactory.getMaxPoolSize()).isEqualTo(10); }
@Test public void bitronixConnectionFactoryPoolConfiguration() { this.context = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(this.context, "spring.jta.bitronix.connectionfactory.minPoolSize:5", "spring.jta.bitronix.connectionfactory.maxPoolSize:10"); this.context.register(JtaPropertiesConfiguration.class, BitronixJtaConfiguration.class, PoolConfiguration.class); this.context.refresh(); PoolingConnectionFactoryBean connectionFactory = this.context .getBean(PoolingConnectionFactoryBean.class); assertThat(connectionFactory.getMinPoolSize(), is(equalTo(5))); assertThat(connectionFactory.getMaxPoolSize(), is(equalTo(10))); }