[cdi-dev] Question on BeanManager#createInstance()
ljnelson at gmail.com
Fri Mar 24 17:19:17 EDT 2017
Hello; BeanManager#createInstance() says (in part):
"Instances of dependent scoped beans obtained with this Instance must be
explicitly destroyed by calling Instance.destroy(Object)."
>From the standpoint of the caller of, say, instance.select(MyBean.class),
how is that caller supposed to know whether MyBean is in dependent scope or
not? Is it anticipated that they will call BeanManager#getBeans() and
investigate the Bean objects? Should Instance have a getScope() method on
it, or the like?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cdi-dev