jsr107 / jsr107spec

JSR107 Cache Specification
Apache License 2.0
413 stars 164 forks source link

@CacheResult doesn't have @InterceptorBinding and Partial-Bean Module #401

Closed luisalves00 closed 6 years ago

luisalves00 commented 6 years ago

I'm using Deltaspike Repositories which uses Partial-Bean. Currently the interceptor for CacheResult doesn't work because it doesn't have @InterceptorBinding. Can/Should the @CacheResult (and the others) have the @InterceptorBinding? Or the spec doens't allow it?

luisalves00 commented 6 years ago

I found this:

/**

}

so InterceptorBinding is actually added....Why it's not there in the first place?

luisalves00 commented 6 years ago

The code from DS is the following:

Class<? extends Annotation> annotationType = annotation.annotationType();

if (annotationType.isAnnotationPresent(InterceptorBinding.class))

how can we look at the changes made by the beforeBeanDiscoveryEvent.addInterceptorBinding?

More detail: https://github.com/apache/deltaspike/blob/master/deltaspike/modules/proxy/api/src/main/java/org/apache/deltaspike/proxy/spi/invocation/DeltaSpikeProxyInterceptorLookup.java#L90

luisalves00 commented 6 years ago

if (beanManager.isInterceptorBinding(annotationType)) <-- should do the trick...nevetheless there's still some issues with the DS partial bean integration.

luisalves00 commented 6 years ago

Fixed on https://issues.apache.org/jira/browse/DELTASPIKE-1339.