[infinispan-issues] [JBoss JIRA] (ISPN-3826) CacheResultInterceptor has no InterceptorBindingType
Jozef Hartinger (JIRA)
issues at jboss.org
Fri Jan 30 08:36:49 EST 2015
[ https://issues.jboss.org/browse/ISPN-3826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036467#comment-13036467 ]
Jozef Hartinger commented on ISPN-3826:
---------------------------------------
An interceptor always needs at least one interceptor binding. An interceptor binding is an annotation that either:
* is annotated with @InterceptorBinding, or
* is programatically registered as an interceptor binding
Since the annotation come from a third-party jar (API) you need the second option. That is actually very simple! For infinispan it is done here:
https://github.com/infinispan/infinispan/blob/15ecd4646fb8fd622b378514e25ca4784be5852c/jcache/src/main/java/org/infinispan/jcache/annotation/AnnotationInjectExtension.java
If this does not work on WebSphere then it must be a bug in WebSphere. I suspect that AnnotationInjectExtension is not run there for some reason or that its actions do not take effect.
> CacheResultInterceptor has no InterceptorBindingType
> ----------------------------------------------------
>
> Key: ISPN-3826
> URL: https://issues.jboss.org/browse/ISPN-3826
> Project: Infinispan
> Issue Type: Bug
> Components: JCache
> Affects Versions: 5.3.0.Final
> Reporter: Nicolai Mainiero
> Assignee: Sebastian Łaskawiec
> Priority: Critical
>
> I'm migrating an enterprise application from JBoss AS 7 to WebSphere AS 8. We use Infinispan as Cache via the JCache API. On JBoss everything works fine. On WebSphere we get the following exception:
> org.apache.webbeans.exception.WebBeansConfigurationException: WebBeans XML configuration defined in file infinispan-jcache-5.3.0.Final.jar!/META-INF/beans.xml is failed. Reason is : Interceptor class : org.infinispan.jcache.annotation.CacheResultInterceptor must have at least one @InterceptorBindingType
> I think the cause is that there is no InterceptorBindingType in the CacheResultInterceptor as required by the specification (https://docs.jboss.org/cdi/spec/1.0/html/interceptors.html) and the CDI implementation of the WebSphere (OpenWebBeans) does not accept Interceptors without bindings.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the infinispan-issues
mailing list