[cdi-dev] Question on BeanManager#createInstance()

Laird Nelson 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...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170324/6c395027/attachment.html 

More information about the cdi-dev mailing list