This content has been marked as final.
Show 2 replies
-
1. Re: [WELD 1.x, CDI 1.0] CDI Programmatic lookup - is calling creationalContext.release() necessary?
mkouba Jul 17, 2013 3:21 AM (in response to eskape)Hi Egor,
it depends on the bean scope - actually only beans with @Dependent pseudo-scope are problematic and cannot be properly destroyed, other built-in scopes should work (release is performed automatically once the bean is destroyed). For dependent beans you would have to store the CreationalContext and invoke bean.destroy(instance, creationalContext) manually.
-
2. Re: [WELD 1.x, CDI 1.0] CDI Programmatic lookup - is calling creationalContext.release() necessary?
wangliyu Jul 22, 2013 11:48 AM (in response to eskape)I have done once, better not to do this way, you can call BeanManager.fireEvent() to let CDI do stuff instead of that. it's safer than this. also use VisualVM you should be able to tell if there is memory leak.