use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.
the class ProxyJCacheConfiguration method cacheInterceptor.
@Bean(name = "jCacheInterceptor")
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public JCacheInterceptor cacheInterceptor(JCacheOperationSource jCacheOperationSource) {
JCacheInterceptor interceptor = new JCacheInterceptor(this.errorHandler);
interceptor.setCacheOperationSource(jCacheOperationSource);
return interceptor;
}
use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.
the class ProxyJCacheConfiguration method cacheAdvisor.
@Bean(name = CacheManagementConfigUtils.JCACHE_ADVISOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public BeanFactoryJCacheOperationSourceAdvisor cacheAdvisor(JCacheOperationSource jCacheOperationSource, JCacheInterceptor jCacheInterceptor) {
BeanFactoryJCacheOperationSourceAdvisor advisor = new BeanFactoryJCacheOperationSourceAdvisor();
advisor.setCacheOperationSource(jCacheOperationSource);
advisor.setAdvice(jCacheInterceptor);
if (this.enableCaching != null) {
advisor.setOrder(this.enableCaching.<Integer>getNumber("order"));
}
return advisor;
}
use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.
the class ProxyTransactionManagementConfiguration method transactionAdvisor.
@Bean(name = TransactionManagementConfigUtils.TRANSACTION_ADVISOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public BeanFactoryTransactionAttributeSourceAdvisor transactionAdvisor(TransactionAttributeSource transactionAttributeSource, TransactionInterceptor transactionInterceptor) {
BeanFactoryTransactionAttributeSourceAdvisor advisor = new BeanFactoryTransactionAttributeSourceAdvisor();
advisor.setTransactionAttributeSource(transactionAttributeSource);
advisor.setAdvice(transactionInterceptor);
if (this.enableTx != null) {
advisor.setOrder(this.enableTx.<Integer>getNumber("order"));
}
return advisor;
}
use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.
the class ProxyTransactionManagementConfiguration method transactionInterceptor.
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TransactionInterceptor transactionInterceptor(TransactionAttributeSource transactionAttributeSource) {
TransactionInterceptor interceptor = new TransactionInterceptor();
interceptor.setTransactionAttributeSource(transactionAttributeSource);
if (this.txManager != null) {
interceptor.setTransactionManager(this.txManager);
}
return interceptor;
}
Aggregations