I remember Marc talking about this issue awhile back. He said the best
performance would be to have the wait within a loop with a 5 second wait.
while (!locked()) // pseudo code
{
this.wait(5000);
if (!locked())
{
log.("LOCKING-WAITING....");
}
}
Regards,
Bill
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of danch
> (Dan Christopherson)
> Sent: Wednesday, June 06, 2001 1:31 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Missing wait/notify (was Re: [JBoss-dev] Avoiding Locks for
> READ-ONLY Beans)
>
>
> danch (Dan Christopherson) wrote:
>
> > Georg Rehfeld wrote:
> >
> >
> >
> > One problem here is that when we're waiting on the context, we want to
> > wait on the context (i.e. "ctx.wait(DEADLOCKTIMEOUT + 1000)")
> Just doing
> > wait and notifyAll on the interceptor itself will involve all calls on
> > our entity when we just want to handle contention for the one context.
> >
> > The other problem is that if we're waiting on the transaction, we don't
> > want to do wait/notify on the context - I don't know what we do want to
> > wait on, but we really need to know when the transaction ends.
>
>
> Actually, looking closer at the code, it's probably the mutex that we
> want to wait on in both cases - it is specific to the key involved.
>
>
>
>
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development