2 Replies Latest reply on Aug 16, 2012 10:51 AM by Julio Faerman

    CDI Closable

    Julio Faerman Novice



      I would like to inject an object that needs closing (a connection to jBPM's Human Task Service, FWIW).


      Without CDI, i'd use a thread local to store the instance and a servlet filter to close it at the end of the request.


      With CDI, how can i @Produce an object and retrieve it in the end of its scope for closing?