I will write a unit test for that. I created this bug mainly do not forget to check it;) I debugged through my project and found the same non-injected non-static values from my TransactionalInterceptor in multiple beans. Actually I was really surprised that Interceptor worked and my private ThreadLocal<EntityManager> ems; was available on another intercepted bean even if I forgot to make this field static ;) I work with a 3 weeks old (pre Bean hierarchy change) version of OWB in this project though.
LieGrue, strub --- Gurkan Erdogdu <cgurkanerdo...@gmail.com> schrieb am Do, 18.2.2010: > Von: Gurkan Erdogdu <cgurkanerdo...@gmail.com> > Betreff: Re: [jira] Created: (OWB-285) Interceptor and Decorator instances > must be @Dependent scoped > An: dev@openwebbeans.apache.org > Datum: Donnerstag, 18. Februar, 2010 07:52 Uhr > >>>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 > __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com