You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Rohit Dilip Kelapure (JIRA)" <ji...@apache.org> on 2011/06/14 17:51:47 UTC

[jira] [Updated] (OWB-586) Interceptors added by portable extensions don't work

     [ https://issues.apache.org/jira/browse/OWB-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Dilip Kelapure updated OWB-586:
-------------------------------------

    Description: 
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". 
In OWB, 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.


 

  was:

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.


 


> 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
>              Labels: tck
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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". 
> In OWB, 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