Hey Marc,

> <THIS IS CRAZY>
> 
> 
> So the new locking cache completely lock the server.
> 
> I started by thinking "Simone..." 

he he he ;-)

> and then we dug deeper and 
> we found that
> the construct
> 
> synchronized(objectA) {
> 
>       synchronized(objectB) {
>               objectB.wait();
>       }
> }
> 
> doesnt' release the lock on objectA *at all*
> So the construct in EntityInstanceCache with synchronized(mutex)
>  synchronized(context) {}}
> doesn't work, bummer.
> So now we need to work around it, the first thing that comes 
> to mind is to
> remove the "mutex" thingy, since I don't think it is really 
> necessary (or is
> it???) 

No, upon me it is not necessary, it suffices sync on the instance cache
object.

> and just lock on the context since at least it seems 
> that it does
> release locks on the object it has.
> ideas?  (btw the test code is in jbosstest and is called "locktest"

I'd suggest to use the instance cache object also for wait and notifyAll
instead of the context. Since the logic for wait and notifyAll is in the
int'rs and they all can access the container, they all can access the
instance cache.

BTW, I've done the changes above and I can run successfully locktest.

Hope I helped,

Best Regards,

Simon

Reply via email to