Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 81999 invoked from network); 6 Sep 2007 18:06:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Sep 2007 18:06:54 -0000 Received: (qmail 20685 invoked by uid 500); 6 Sep 2007 18:06:47 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 20634 invoked by uid 500); 6 Sep 2007 18:06:47 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 20623 invoked by uid 99); 6 Sep 2007 18:06:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 11:06:46 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 18:06:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B84B77141F2 for ; Thu, 6 Sep 2007 11:06:31 -0700 (PDT) Message-ID: <5010120.1189101991751.JavaMail.jira@brutus> Date: Thu, 6 Sep 2007 11:06:31 -0700 (PDT) From: "Rich Scheuerle (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Updated: (AXIS2-3177) JAXWS: Concurrent Modification in Property Migrator In-Reply-To: <18838419.1189100193010.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-3177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rich Scheuerle updated AXIS2-3177: ---------------------------------- Component/s: jaxws > JAXWS: Concurrent Modification in Property Migrator > --------------------------------------------------- > > Key: AXIS2-3177 > URL: https://issues.apache.org/jira/browse/AXIS2-3177 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: jaxws > Reporter: Rich Scheuerle > Assignee: Rich Scheuerle > > Problem: > The code that iterates over the property keys in the JAXWS PropertyMigrator can result in a concurrent modification exception. > Solution: > Dustin Amrhein provided a simple solution to avoid the property key iterator. > The new code is: > public void migratePropertiesToMessageContext(Map userContext, > MessageContext messageContext) { > // Avoid using putAll as this causes copies of the propery set > if (userContext != null) { > // should not use iterator here because this map may be modified > // on different threads by the user or other JAX-WS code > String[] keys = new String[userContext.keySet().size()]; > keys = userContext.keySet().toArray(keys); > for(int i=0; i < keys.length; i++) { > String key = keys[i]; > Object value = userContext.get(key); > // Make sure mtom state in the user context, the message context, > // the MEP context are the same. > if(key.equalsIgnoreCase(Constants.Configuration.ENABLE_MTOM)){ > value = messageContext.getMessage().isMTOMEnabled(); > messageContext.getMEPContext().put(key, value); > } > messageContext.setProperty(key, value); > } > } > } > I will commit this change after I complete testing. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org