Yes, you are right, and that it is (was?) written in the spec that UnitOfWork have thread scope and MUST NOT be assigned from one thread to another. That said, there is a suspend()/resume() which can be used to transfer thread ownership, which the configuration system relies (relied?) on.
Cheers Niclas 2011/8/1 Falko Bräutigam <[email protected]>: > Hi all, > > the UnitOfWorkInstance keeps a stack of instances in a ThreadLocal but it > does not check what Thread is starting and later closing the UoW. If the > Threads are different, then you end up with a real naste memory leak as the > UoW never gets removed from the stack and holds all caches entity states and > whatever forever. > > Am I right or do I miss something? If right, then is there any spec about > proper thread to UoW relation? > > -Falko > -- > Falko Bräutigam > http://polymap.org > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev > -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/24svnvk I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

