I don't understand what is different between the two. Are you saying to 
have only one place where we wait? If so I agree.

Bill Burke wrote:

> It's not this same.  Basically you have a loop to check to see if the
> transaction has been commited or unlocked, but you put a wait of 5 seconds
> in there. After the 5 seconds if you're still not locked loop again.
> 
> OT, how does transaction timeout destroy the thread?  TIA.
> 
> 
> Bill
> 
> 
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED]]On Behalf Of danch
>>(Dan Christopherson)
>>Sent: Wednesday, June 06, 2001 3:35 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: Missing wait/notify (was Re: [JBoss-dev] Avoiding Locks for
>>READ-ONLY Beans)
>>
>>
>>I think that's roughly equivalent to Georg's 'wait(DEADLOCKTIMEOUT +
>>1000)'. Did Marc talk about waiting on 'this'? or is that non-literal?
>>
>>Bill Burke wrote:
>>
>>
>>>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
>>>
>>>
>>
>>
> 
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 


Confidential e-mail for addressee only.  Access to this e-mail by anyone else is 
unauthorized.
If you have received this message in error, please notify the sender immediately by 
reply e-mail 
and destroy the original communication.

Reply via email to