-
Bug
-
Resolution: Done
-
Major
-
3.1.8.Final, 4.0.2.Final
-
None
-
None
When creating beans with BeanConfigurator, users can use a variant that has Instance<T> as parameter and can create another dependent bean instances which should be destroyed when this bean is destroyed.
However, this isn't currently happening and they are just left behind untouched.
New dependent beans can be created in both, create and destroy callbacks.
Note that just adding creationalContext.release() into BeanConfiguratorImpl$ImmutableBean#destroy() doesn't help either because it can lead to double invocation under certain conditions (as described in WELD-1010).