>>>but we actually share the same interceptor instance for all beans with the same interceptor annotation. I think this is not true. Actually we create interceptor stack for every beans (WeBBeansInterceptorConfig#configure). This method creates different InterceptorData stack for different beans.
After that we use "InterceptorHandler#injectInterceptorFields(stack)" to set actual interceptor's bean instance. In this method, it creates different interceptor instances using getManager.getReference. * For EJB related interceptors, we create new instance in WebBeansUtil#configureItnerceptorMethods. What we will have to do is that we must add Decorators and Interceptors beans into Bean creastional context dependent store in Interceptor Handler. Therefore when bean is destroyed, decorators and interceptors are also destroyed. * 2010/2/18 Mark Struberg (JIRA) <j...@apache.org> > Interceptor and Decorator instances must be @Dependent scoped > ------------------------------------------------------------- > > Key: OWB-285 > URL: https://issues.apache.org/jira/browse/OWB-285 > Project: OpenWebBeans > Issue Type: Bug > Components: Interceptor and Decorators > Affects Versions: M3 > Reporter: Mark Struberg > Assignee: Gurkan Erdogdu > > > section 6.4.1 defines > > * Instances of decorators and interceptors are dependent objects of the > bean instance they decorate. > > but we actually share the same interceptor instance for all beans with the > same interceptor annotation. > > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > -- Gurkan Erdogdu http://gurkanerdogdu.blogspot.com