Description
camel-bam is not thread safe and throws ConcurrentModificationException:
2012-03-04 14:36:39,528 [d #0 - seda://a] ERROR BamProcessorSupport - Caught: java.util.ConcurrentModificationException java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) at java.util.HashMap$KeyIterator.next(HashMap.java:828) at org.apache.camel.bam.model.ProcessInstance.getActivityState(ProcessInstance.java:123) at org.apache.camel.bam.TimeExpression.evaluate(TimeExpression.java:55) at org.apache.camel.bam.rules.TemporalRule.processExchange(TemporalRule.java:100) at org.apache.camel.bam.rules.ActivityRules.processExchange(ActivityRules.java:63) at org.apache.camel.bam.rules.ProcessRules.processExchange(ProcessRules.java:44) at org.apache.camel.bam.processor.JpaBamProcessor.processEntity(JpaBamProcessor.java:58) at org.apache.camel.bam.processor.JpaBamProcessor.processEntity(JpaBamProcessor.java:37) at org.apache.camel.bam.processor.BamProcessorSupport$1.doInTransaction(BamProcessorSupport.java:97) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at org.apache.camel.bam.processor.BamProcessorSupport.process(BamProcessorSupport.java:89) at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:223) at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303) at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150) at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:261) at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:173) at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:132) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680)