I have a few questions on ejb integration on Weld.

1)Does Weld handle the instance creation for ejb (using injectionTarget.produce) or delegate the instance creation to EJB container? I guess Weld will create the instead as it can manage decorators. If not, how can decorators be managed? Please confirm.

2) When Weld creates the EJB instance, how can the other non-CDI aroundconstruct interceptors (such as the interceptors defined via ejb-jar.xml or @Interceptors) be passed in? I found out the WeldCreationContext and AroundConstructCallback but I cannot find anything mentioned in the weld reference doc. Is this the right plugin point?

3)If Weld creates the EJB instance, how can all interceptors (cdi style and ejb style) be invoked? Will the instance need to be passed back to EJB container together with all CDI interceptors (get hold of them via EjbEndpointServiceImpl.java) and EJB container needs to manage the interceptors being invoked?

4)In Weld spec, it says you must register the SessionBeanInterceptor as the inner most interceptor in the stack for all EJBS. Can you clarify what inner most means? Does this interceptor need to be the first EJB interceptor to be called or the last EJB interceptor to be invoked?


--
Thanks
Emily
=================
Emily Jiang
ejiang@apache.org