Can't you just rely on the cleanup() in FullTextIndexEventListener ?
That would be a good place to use ThreadLocal.remove();
When using the "autoregistration" of the listeners (see EventListenerRegister),
the ThreadLocal isn't used actually (As far as I understand):
so as 3.1 does target core 3.3,
On Nov 24, 2008, at 21:40, Hardy Ferentschik wrote:
memory leak on redeploy (quite good information here, but this is
going to be hard)
http://forum.hibernate.org/viewtopic.php?p=2400319
A tricky one indeed. I don't think this is something we can address
for the GA release.
Interesting th