You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/15 16:40:52 UTC

[jira] Closed: (AXIS-1584) ConcurrentModificationException in ManagedMemoryDataSource class

Message:

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Fri, 15 Oct 2004 7:40 AM

Checked in a fix, please review.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1584

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1584
    Summary: ConcurrentModificationException in ManagedMemoryDataSource class
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.2 Beta

   Assignee: Davanum Srinivas
   Reporter: Ananth Krishna

    Created: Mon, 4 Oct 2004 9:06 AM
    Updated: Fri, 15 Oct 2004 7:40 AM
Environment: Windows XP, SUSE 9.0

Description:
SOAP Attachments, when used in axis 1_2 beta leave a trail of temp files and one of the ways I have found for cleaning all temp files is by using the delete method of the ManagedMemoryDataSource (MMDS) class. It works well for small attachments (of the order of kilobytes) but for anything over a few MB (6/7), there is a java.util.ConcurrentModificationException thrown.

I believe I have a patch for it and have tested that it works. This involves a change in an inner class called InStream of the MMDS class.

The close() method of the InStream class is called by the delete() method of the MMDS class. However, the trouble is the delete() method iterates over a WeakHashMap and the close() method in the InStream class tries to remove elements from this WeakHashMap. 

To avoid this race condition, I have created another method closeStream() in the InStream class which, can be invoked by the delete() method in the MMDS class. 

Deleting elements from the WeakHashMap isnt affected in anyway as the HashMap is cleared of all it's elements before the method returns. Also, all other methods invoking close() can continue to do so in the same manner as we dont touch that method at all..


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira