Hello;

Subject is a little long :)

I would like to explain some of the design rational of current code in regard 
to using CreationalContext and handling of Decroators/Interceptors. Creational 
context is implemented by the CreationalContextImpl and is used for saving 
dependent instances of the NormalScoped beans, i.e saving dependent bean 
instance, decorstors, interceptors, ejb interceptors etc. 

In first creation of the normal scoped bean instance, it is created and saved 
in the AbstractContext. After that all of its dependents are getting from this 
cretional context. NormalScopedBeansInterceptorHandler uses this semantic to 
get its creational context and setup decorators and interceptors.

Moreover, decorators and interceptors of the bean instance is setup only once 
and saved in creational context .After destroying bean contexts, bean's 
cretional contexts are destroyed by the container.

Therefore, current code base is hugely dependent on usage of 
CreationalContextImpl class. 

Currently, we pass all of the standalone tests(some issues have written to CDI 
TCK jira) and huge part of the web profile tests. Before changing critical 
parts of the codebase, please run TCK before committing them.

But it always needs another eye to find out more elegant solution. But we have 
really arrived in a good point and care must be taken to not broke the running 
code :)

Thanks;

--Gurkan



      ___________________________________________________________________
Yahoo! Türkiye açıldı!  http://yahoo.com.tr
İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!

Reply via email to