cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Continuation invalidation strategy
Date Mon, 02 May 2005 17:24:40 GMT
Leszek Gawron wrote:
> Vadim Gritsenko wrote:
> 
>> If you want to tinker with ContinuationsManagerImpl, take a look at:
>>   http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=111323704203839
> 
> Strange I missed that post ..
> 
>
>> Unsynchronized access to WebContinuationsHolder from 
>> invalidateContinuations() simultaneously with write access in 
>> generateContinuation() should reliably cause 
>> ConcurrentModificationException.
> 
> I do not quite get the problem. Doesn't it cause 
> ConcurrentModificationException now?

It should - I've not seen it though.


> Other thing is how can invalidateContinuations and generateContinuation 
> be run concurrently. invalidateContinuations is invoked only for expired 
> sessions - how can new continuation be generated for that session?

Bad example then. Here is better one:

   invalidateContinuations() gets Iterator on continuationsHolder.holder map.
   invalidateContinuations() calls _invalidate()
   _invalidate() calls disposeContinuation()
   disposeContinuation() modifies continuationsHolder.holder map.

After that,

   invalidateContinuations() calls next() and causes 
ConcurrentModificationException.

Seems to me invalidateContinuations() should have while(!empty) loop instead of 
iterator.

Vadim

Mime
View raw message