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