[cdi-dev] Proposal - Allow TransientReference to be used on producers.

John D. Ament john.d.ament at gmail.com
Tue May 3 13:20:55 EDT 2016


I have opened a while ago - https://issues.jboss.org/browse/CDI-457 which
was originally to add a disposable interface.  The main driver was that if
you're using an injection point like

private Instance<MyDependentBean> beanInst;

doing beanInst.get() can cause leaking beans since there is no creational
context.  Upon looking at it further, there's some effort to do this in a
safer way and leverage things like TransientReference.

This doesn't work for classes provided by external libraries, even the JDK
itself (like String).  I'd like to propose that the scope of this ticket be
to allow TransientReference on producer fields/methods since right now its
only allowed on types.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20160503/36b5d1fe/attachment.html 

More information about the cdi-dev mailing list