[weld-dev] ManagedBean and Weld integration

Jozef Hartinger jharting at redhat.com
Wed Jun 3 01:49:57 EDT 2015


That's expected. The non-cdi interceptors are expected to be partially 
managed by the EE container (resource injection). If you need resource 
injection in the non-CDI interceptors you can use InjectionTargetBuilder 
to customize this behavior, e.g:

beanManager.createInjectionTargetBuilder(type)
     .setDecorationEnabled(false)
     .setInterceptionEnabled(false)
     .setTargetClassLifecycleCallbacksEnabled(false)
     .setResourceInjectionEnabled(true)
     .build()

On 06/02/2015 06:15 PM, Emily Jiang wrote:
>
> For managed beans (@ManagedBean classes), they are java EE component 
> classes. They support both cdi and non-cdi interceptors. When I create 
> a instance using injectionTarget.produce(), I got hold of the instance 
> with both cdi and non-cdi interceptors associated. However, the 
> @Resource injection point on the non-cdi interceptors are not injected 
> when Weld creates the interceptor instances.
>
> Is there anything I have missed or this is a bug?
> -- 
> Thanks
> Emily
> =================
> Emily Jiang
> ejiang at apache.org <mailto:ejiang at apache.org>
>
>
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20150603/386304d5/attachment.html 


More information about the weld-dev mailing list