Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 29324 invoked from network); 11 Mar 2009 18:39:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Mar 2009 18:39:15 -0000 Received: (qmail 63750 invoked by uid 500); 11 Mar 2009 18:39:15 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 63661 invoked by uid 500); 11 Mar 2009 18:39:15 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 63426 invoked by uid 99); 11 Mar 2009 18:39:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2009 11:39:14 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2009 18:39:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D19A9234C046 for ; Wed, 11 Mar 2009 11:38:50 -0700 (PDT) Message-ID: <973221613.1236796730857.JavaMail.jira@brutus> Date: Wed, 11 Mar 2009 11:38:50 -0700 (PDT) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Subject: [jira] Commented: (CXF-2105) The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown In-Reply-To: <790743712.1236795050957.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680973#action_12680973 ] Daniel Kulp commented on CXF-2105: ---------------------------------- Actually, the fix is even easier: - listeners = new ArrayList(); + listeners = new CopyOnWriteArrayList(); Anyway, I'll get the committed and merged down. > The CxfBusLifeCycleManager can cause ConcurrentModificationExceptions to be thrown > ---------------------------------------------------------------------------------- > > Key: CXF-2105 > URL: https://issues.apache.org/jira/browse/CXF-2105 > Project: CXF > Issue Type: Bug > Components: Core > Affects Versions: 2.0.10 > Reporter: Eamonn Dwyer > Assignee: Daniel Kulp > Fix For: 2.0.11 > > Attachments: Mar11.patch > > > The CxfBusLifeCycleManager has a list of listeners. in a number of occasions it iterates over this list and makes calls out to each listener. Each listener can then call back into the CxfBusLifeCycleManager and potentially try access the listeners. This causes the exception. Typically the exception thrown looks like. > java.util.ConcurrentModificationException > at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449) > at java.util.AbstractList$Itr.next(AbstractList.java:420) > at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:81) > at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:122) > at org.apache.cxf.testutil.common.AbstractBusClientServerTestBase.deleteStaticBus(AbstractBusClientServerTestBase.java:89) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74) > at org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37) > at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) > at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) > at org.apache.maven.surefire.Surefire.run(Surefire.java:132) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) > at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.