I'm evaluating the use of the infinispan cdi module for an upcoming project and ran into problem attempting to use the JCache interceptors in a conversation scoped bean.
I have a method in the bean annotated with @CacheResult(cacheName = "policyInquiryCache"), but during deployment I get the following error.
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001402 The bean Session bean [class com.hochheim.hponline.inquiry.PolicyView with qualifiers [@Any @Default @Named]; local interfaces are [PolicyView] declared a passivating scope but has a non-serializable interceptor Interceptor [class org.infinispan.cdi.interceptor.CacheResultInterceptor intercepts @CacheResult]
Is there something I'm missing, or does the interceptors need to be made passivation capable?
I'm using cdi module version 5.0.1.Final and deploying into AS 7.0.2.
As you said, the JCache interceptors have to be passivation capable to be used with a passivating scopes (chapter 6 of CDI specification). This is a bug and I'll create an issue now!
Thanks for pointing this out!