You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/10/26 15:59:40 UTC

[jira] Commented: (CAMEL-3275) CaseInsensitiveMap should extend ConcurrentHashMap

    [ https://issues.apache.org/activemq/browse/CAMEL-3275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62842#action_62842 ] 

Claus Ibsen commented on CAMEL-3275:
------------------------------------

Ah the problem is the {{putAll} method which should be {{synchronized}}. So the fix should be

from
{code}
    public void putAll(Map<? extends String, ?> map) {
{code}

To
{code}
    public synchronized void putAll(Map<? extends String, ?> map) {
{code}

> CaseInsensitiveMap should extend ConcurrentHashMap
> --------------------------------------------------
>
>                 Key: CAMEL-3275
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3275
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.6.0
>
>
> [10/25/2010 -:- 03:27:22 PM] <tarjei> cibsen: I get a few of these errors on a route using SEDA queues:
> [10/25/2010 -:- 03:27:43 PM] <tarjei> Caused by: [java.util.ConcurrentModificationException - null]
> [10/25/2010 -:- 03:27:44 PM] <tarjei>  java.util.ConcurrentModificationException
> [10/25/2010 -:- 03:27:44 PM] <tarjei> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810)
> [10/25/2010 -:- 03:27:44 PM] <tarjei> at java.util.HashMap$EntryIterator.next(HashMap.java:851)
> [10/25/2010 -:- 03:27:44 PM] <tarjei> at java.util.HashMap$EntryIterator.next(HashMap.java:849)
> [10/25/2010 -:- 03:27:46 PM] <tarjei> at org.apache.camel.util.CaseInsensitiveMap.entrySet(CaseInsensitiveMap.java:120)
> [10/25/2010 -:- 03:27:49 PM] <tarjei> at org.apache.camel.util.CaseInsensitiveMap.putAll(CaseInsensitiveMap.java:86)
> [10/25/2010 -:- 03:27:51 PM] <tarjei> at org.apache.camel.impl.MessageSupport.copyFrom(MessageSupport.java:142)
> [10/25/2010 -:- 03:27:54 PM] <tarjei> at org.apache.camel.impl.DefaultMessage.copyFrom(DefaultMessage.java:52)
> [10/25/2010 -:- 03:27:56 PM] <tarjei> at org.apache.camel.util.ExchangeHelper.copyResults(ExchangeHelper.java:215)
> [10/25/2010 -:- 03:27:59 PM] <tarjei> at org.apache.camel.processor.Pipeline.process(Pipeline.java:128)
> [10/25/2010 -:- 03:28:01 PM] <tarjei> at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)
> [10/25/2010 -:- 03:28:05 PM] <tarjei> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
> [10/25/2010 -:- 03:28:08 PM] <tarjei> at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
> [10/25/2010 -:- 03:28:11 PM] <tarjei> at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
> [10/25/2010 -:- 03:28:14 PM] <tarjei> at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
> [10/25/2010 -:- 03:28:17 PM] <tarjei> at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
> [10/25/2010 -:- 03:28:20 PM] <tarjei> at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:170)
> [10/25/2010 -:- 03:28:23 PM] <tarjei> at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:112)
> [10/25/2010 -:- 03:28:25 PM] <tarjei> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> [10/25/2010 -:- 03:28:28 PM] <tarjei> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> [10/25/2010 -:- 03:28:31 PM] <tarjei> at java.lang.Thread.run(Thread.java:636)
> [10/25/2010 -:- 03:28:34 PM] <tarjei> It seems to me to be an error completely within Camel so I thought I'd report it.
> [10/25/2010 -:- 03:30:26 PM] <tarjei> I got the error about 10/30 times having run about 5m messages through the different routes running in that jvm
> [10/25/2010 -:- 03:51:36 PM] <cibsen> and do your prod server have more cpu cores?
> [10/25/2010 -:- 03:51:42 PM] <cibsen> ibm, sun jdk?
> [10/25/2010 -:- 03:51:51 PM] <tarjei> Yes - 4. This is openjdk
> [10/25/2010 -:- 03:51:54 PM] <tarjei> both places
> [10/25/2010 -:- 03:52:03 PM] <cibsen> what os?
> [10/25/2010 -:- 03:52:22 PM] <tarjei> Centos 5
> [10/25/2010 -:- 03:52:36 PM] <cibsen> yeah kinda figured when you said openjdk
> [10/25/2010 -:- 03:53:06 PM] <tarjei> 1.6.0-17

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.