Alex Karasulu wrote:
Something needs to be done here since there's a global static in there that we use to set these registries. The registries can be injected by an overloaded version of the the deserializing stream as David suggests or some callback can be used perhaps to set the registry to be used.
Either a callback or an injection sounds good to me. I thought again about this problem under my shower [1] and found that we must store this Registries/DS into each entry, to avoid passing this element in each method call. Any other solution has much more side effect : - a singleton is a no-go, because ADS is embeddable, and we don't want to define our own class-loader. - storing this info in a ThreadLocal seems too costly... (to be double-checked)

So I will try to implement David's trick, and may be Alex's one, if I have time. The reason I prefer David's idea is just because it's isolated, and deasy to implement.


Thanks guys !

[1] the most wonderfull thing about shower is that it's not only a place where you sing and wash, it's also a place you have the brightest ideas every day. I don't know why, but this is it. Sadly, we are wired with short term memory, and as soon as we get out of the shower, the towel acts as a memory eraser ;)

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to