我正在使用Spring Boot 1.2.0.RC1 + bitronix + hornetq(嵌入式)+ JPA,我想增加bitronix jmsConnectionFactory池大小,目前它的限制为10.有没有一种简单的方法可以做到这一点,例如在application.properties内部或@Configuration类内部?
答案 0 :(得分:1)
目前您无法通过application.properties
对其进行配置(我已打开an issue),但您可以通过声明@Configuration
课程来完成此操作拥有XAConnectionFactoryWrapper
bean:
@Bean
public XAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
return new XAConnectionFactoryWrapper() {
@Override
public ConnectionFactory wrapConnectionFactory(
XAConnectionFactory connectionFactory) {
PoolingConnectionFactoryBean pool = new PoolingConnectionFactoryBean();
pool.setConnectionFactory(connectionFactory);
pool.setMaxPoolSize(50);
return pool;
}
};
}