Interceptors added by portable extensions don't work
----------------------------------------------------
Key: OWB-586
URL: https://issues.apache.org/jira/browse/OWB-586
Project: OpenWebBeans
Issue Type: Bug
Components: Interceptor and Decorators
Affects Versions: 1.0.0
Reporter: Rohit Dilip Kelapure
Assignee: Gurkan Erdogdu
The CDI Spec says "During the application initialization process, the container
fires a series of events, allowing portable extensions to integrate with the
container initialization process". Interceptors added programatically during
these lifecycle events are NOT added to our interceptor stack in
org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl.addBean(Bean<?>).
In
org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl.addBean(Bean<?>)
we create a CustomInterceptor that wraps the passed interceptor. We then add
this CustomInterceptor to a set of
org.apache.webbeans.container.BeanManagerImpl.webBeansInterceptors.
Unfortunately multiple CustomInterceptor instances evaluate to the same
hashcode and different interceptors overwrite one another when they get added
to the Set. Consequently the right set of interceptors does not fire when a
managed bean is to be intercepted.
The fix to this issue is for CustomInterceptor and WebBeansInterceptor to
override the default equals and hashcode methods.
This bug causes 6 tests of the
org.jboss.jsr299.tck.tests.interceptors.definition.custom.CustomInterceptorTest
to FAIL.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira