cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Bug in ContinuationManagerImpl
Date Wed, 03 Sep 2008 22:37:46 GMT
On 03.09.2008 23:37, Joerg Heinicke wrote:

>> Exception in thread "Timer-0" java.util.ConcurrentModificationException
>>         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
>>         at java.util.HashMap$ValueIterator.next(Unknown Source)
>>         at 
>> org.apache.cocoon.components.flow.ContinuationsManagerImpl.invalidateContinuations(

>> ContinuationsManagerImpl.java:390)
>>         at 
>> org.apache.cocoon.components.flow.ContinuationsManagerImpl$WebContinuationsHolder.valueUnbound(

>> ContinuationsManagerImpl.java:548)
>>         at 
>> org.mortbay.jetty.servlet.AbstractSessionManager$Session.unbindValue(
>> AbstractSessionManager.java:1125)
> 
> It's a new bug I introduced with [1]. Reviewing the changes I did I 
> found that I "optimized" some code. :-) It's around line 390 [2]. I'll 
> have a look on how to fix it. Sorry for the inconveniences.

Two different proposals:
1. Reintroducing the original workaround using 
continuationsHolder.holder.values().toArray() in 
invalidateContinuations(..).

2. Adding iter.remove() directly after iter.next() in line 390. The 
later problematic call to remove the continuation from the map would 
just not do anything.

WDYT?

Joerg

> [1] http://svn.apache.org/viewvc?view=rev&revision=643752
> [2] 
> http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java?r1=643716&r2=643752&diff_format=h


Mime
View raw message