[infinispan-issues] [JBoss JIRA] (ISPN-10173) infinispan-springX-remote doesn't allow to disable cached session with a configuration property

Jose Antonio Iñigo (Jira) issues at jboss.org
Thu May 9 11:37:00 EDT 2019


     [ https://issues.jboss.org/browse/ISPN-10173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jose Antonio Iñigo updated ISPN-10173:
--------------------------------------
    Description: 
I am using infinispan-spring4-remote in a Spring Boot 1.5 project. This declares the EnableInfinispanRemoteHttpSession in its main class.

I don't want to use the distribuited cache for http session externalization in unit/integration tests launched with JUnit. The problem is the application crashes when launching the tests:



{code:java}
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.infinispan.spring.provider.SpringRemoteCacheManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1491)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
	... 63 more
{code}


EnableInfinispanRemoteHttpSession imports InfinispanRemoteHttpSessionConfiguration and the latter doesn't have any way (@ConditionalOnProperty for instance) that would allow us to disable that behaviour.  

  was:
I am using infinispan-spring4-remote in a Spring Boot 1.5 project. This declares the EnableInfinispanRemoteHttpSession in its main class.

I don't want to use the distribuited cache for http session externalization in unit/integration tests launched with JUnit. The problem is the application crashes when launching the tests:

```
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.infinispan.spring.provider.SpringRemoteCacheManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1491)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
	... 63 more
```

EnableInfinispanRemoteHttpSession imports InfinispanRemoteHttpSessionConfiguration and the latter doesn't have any way (@ConditionalOnProperty for instance) that would allow us to disable that behaviour.  



> infinispan-springX-remote doesn't allow to disable cached session with a configuration property
> -----------------------------------------------------------------------------------------------
>
>                 Key: ISPN-10173
>                 URL: https://issues.jboss.org/browse/ISPN-10173
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Spring Integration
>            Reporter: Jose Antonio Iñigo
>            Priority: Major
>
> I am using infinispan-spring4-remote in a Spring Boot 1.5 project. This declares the EnableInfinispanRemoteHttpSession in its main class.
> I don't want to use the distribuited cache for http session externalization in unit/integration tests launched with JUnit. The problem is the application crashes when launching the tests:
> {code:java}
> Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.infinispan.spring.provider.SpringRemoteCacheManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
> 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1491)
> 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
> 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
> 	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
> 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
> 	... 63 more
> {code}
> EnableInfinispanRemoteHttpSession imports InfinispanRemoteHttpSessionConfiguration and the latter doesn't have any way (@ConditionalOnProperty for instance) that would allow us to disable that behaviour.  



--
This message was sent by Atlassian Jira
(v7.12.1#712002)



More information about the infinispan-issues mailing list