Hi Romain,
I am not sure about Autoclosable on Jsonb. Jsonb instance is designed to
be threadsafe and is able to be set into a field as a depenency of a
container managed bean. A jsonbConfig with adapters is stored inside and
is shared between threads which are using such Jsonb instance. It is not
supposed to be disposed and created again each method call in the same
component bean.
Anyway after jsonb instance is not needed anymore and a cleanup must be
done on adapters which are instantiated and injected by some container,
can't you just hook cleanup of them on such container managed bean
lifecycle? You can implement any interface besides JsonbAdapter or
annotate any additional method for cleanup, so the Jsonb instance don't
have to propagate cleanup on its adapters. Would it be good enough?
Regards,
Roman
On 01/29/2016 02:19 PM, Romain Manni-Bucau wrote:
> Hi guys,
>
> if we add CDI support to adapters we'll need Jsonb to be closeable to
> be able to cleanup CDI context.
>
> Is that something we can get?
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau