|
|
|
@ -45,7 +45,8 @@ class ArtemisConnectionFactoryConfiguration {
|
|
|
|
|
|
|
|
|
|
@Configuration(proxyBeanMethods = false)
|
|
|
|
|
@ConditionalOnClass(CachingConnectionFactory.class)
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.artemis.pool", name = "enabled", havingValue = "false", matchIfMissing = true)
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.artemis.pool", name = "enabled",
|
|
|
|
|
havingValue = "false", matchIfMissing = true)
|
|
|
|
|
static class SimpleConnectionFactoryConfiguration {
|
|
|
|
|
|
|
|
|
|
private final ArtemisProperties properties;
|
|
|
|
@ -59,7 +60,8 @@ class ArtemisConnectionFactoryConfiguration {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.jms.cache", name = "enabled", havingValue = "true", matchIfMissing = true)
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.jms.cache", name = "enabled",
|
|
|
|
|
havingValue = "true", matchIfMissing = true)
|
|
|
|
|
public CachingConnectionFactory cachingJmsConnectionFactory(
|
|
|
|
|
JmsProperties jmsProperties) {
|
|
|
|
|
JmsProperties.Cache cacheProperties = jmsProperties.getCache();
|
|
|
|
@ -72,7 +74,8 @@ class ArtemisConnectionFactoryConfiguration {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.jms.cache", name = "enabled", havingValue = "false")
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.jms.cache", name = "enabled",
|
|
|
|
|
havingValue = "false")
|
|
|
|
|
public ActiveMQConnectionFactory jmsConnectionFactory() {
|
|
|
|
|
return createConnectionFactory();
|
|
|
|
|
}
|
|
|
|
@ -89,7 +92,8 @@ class ArtemisConnectionFactoryConfiguration {
|
|
|
|
|
static class PooledConnectionFactoryConfiguration {
|
|
|
|
|
|
|
|
|
|
@Bean(destroyMethod = "stop")
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.artemis.pool", name = "enabled", havingValue = "true", matchIfMissing = false)
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.artemis.pool", name = "enabled",
|
|
|
|
|
havingValue = "true", matchIfMissing = false)
|
|
|
|
|
public JmsPoolConnectionFactory pooledJmsConnectionFactory(
|
|
|
|
|
ListableBeanFactory beanFactory, ArtemisProperties properties) {
|
|
|
|
|
ActiveMQConnectionFactory connectionFactory = new ArtemisConnectionFactoryFactory(
|
|
|
|
|