@ -41,12 +42,15 @@ abstract class AbstractCacheInterceptor<O extends AbstractJCacheOperation<A>, A
@@ -41,12 +42,15 @@ abstract class AbstractCacheInterceptor<O extends AbstractJCacheOperation<A>, A
@ -68,15 +72,15 @@ abstract class AbstractCacheInterceptor<O extends AbstractJCacheOperation<A>, A
@@ -68,15 +72,15 @@ abstract class AbstractCacheInterceptor<O extends AbstractJCacheOperation<A>, A
@ -79,8 +57,8 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@@ -79,8 +57,8 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
if(found>1){
thrownewIllegalStateException("More than one cache annotation found on '"+method+"'");
@ -103,9 +81,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@@ -103,9 +81,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@ -123,49 +99,39 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@@ -123,49 +99,39 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@ -181,6 +147,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@@ -181,6 +147,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@ -192,6 +159,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@@ -192,6 +159,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@ -203,8 +171,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@@ -203,8 +171,7 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@ -233,28 +200,48 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@@ -233,28 +200,48 @@ public abstract class AnnotationJCacheOperationSource extends AbstractFallbackJC
@ -54,6 +53,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
@@ -54,6 +53,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
@ -104,24 +104,33 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
@@ -104,24 +104,33 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
thrownewIllegalStateException("No unique ["+type.getName()+"] bean found in application context - "+
"mark one as primary, or declare a more specific implementation type for your cache",ex);
}
catch(NoSuchBeanDefinitionExceptionex){
if(logger.isDebugEnabled()){
logger.debug("No bean of type ["+type.getName()+"] found in application context",ex);
}
returnBeanUtils.instantiateClass(type);
}
}
@ -149,11 +158,16 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
@@ -149,11 +158,16 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc
@ -51,11 +50,11 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
@@ -51,11 +50,11 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
assertTrue(e.getMessage().contains("JSR-107 only supports a single cache."));
catch(IllegalStateExceptionex){
assertTrue(ex.getMessage().contains("JSR-107 only supports a single cache"));
}
catch(Throwablet){
fail("Unexpected: "+t);
catch(Throwableex){
fail("Unexpected: "+ex);
}
}
@ -71,17 +70,17 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
@@ -71,17 +70,17 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
@ -93,23 +92,21 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
@@ -93,23 +92,21 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
@ -129,6 +126,7 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
@@ -129,6 +126,7 @@ public class JCacheInterceptorTests extends AbstractJCacheTests {
@ -98,9 +100,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -98,9 +100,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
Assert.notEmpty(cacheOperationSources,"At least 1 CacheOperationSource needs to be specified");
@ -132,9 +133,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -132,9 +133,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -151,7 +151,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -151,7 +151,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
Assert.notNull(cacheResolver,"CacheResolver must not be null");
this.cacheResolver=cacheResolver;
}
@ -159,7 +159,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -159,7 +159,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -167,28 +167,33 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -167,28 +167,33 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
this.applicationContext=applicationContext;
}
publicvoidafterPropertiesSet(){
Assert.state(this.cacheOperationSource!=null,"The 'cacheOperationSources' property is required: "+
Assert.state(getCacheOperationSource()!=null,"The 'cacheOperationSources' property is required: "+
"If there are no cacheable methods, then don't use a cache aspect.");
Assert.state(this.getErrorHandler()!=null,"The 'errorHandler' is required.");
Assert.state(getErrorHandler()!=null,"The 'errorHandler' property is required");
@ -203,19 +208,20 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -203,19 +208,20 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -230,10 +236,11 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -230,10 +236,11 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -255,7 +262,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -255,7 +262,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -263,7 +270,6 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -263,7 +270,6 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -273,15 +279,14 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -273,15 +279,14 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -486,8 +491,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -486,8 +491,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -508,14 +513,18 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -508,14 +513,18 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -524,6 +533,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -524,6 +533,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -536,8 +546,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -536,8 +546,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -547,22 +556,22 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -547,22 +556,22 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -579,7 +588,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -579,7 +588,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -600,15 +610,15 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -600,15 +610,15 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -642,9 +652,11 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -642,9 +652,11 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -653,20 +665,21 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@@ -653,20 +665,21 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
@ -75,13 +73,14 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@@ -75,13 +73,14 @@ public class EnableCachingTests extends AbstractAnnotationTests {
assertTrue(root.getMessage().contains("beans of type CacheManager"));
throwroot;
@ -95,26 +94,28 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@@ -95,26 +94,28 @@ public class EnableCachingTests extends AbstractAnnotationTests {
assertTrue(root.getMessage().contains("No bean of type CacheManager"));
throwroot;
@ -149,6 +150,7 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@@ -149,6 +150,7 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@ -198,39 +200,56 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@@ -198,39 +200,56 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@ -241,6 +260,7 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@@ -241,6 +260,7 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@ -263,4 +283,5 @@ public class EnableCachingTests extends AbstractAnnotationTests {
@@ -263,4 +283,5 @@ public class EnableCachingTests extends AbstractAnnotationTests {