axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ananth Krishna (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1584) ConcurrentModificationException in ManagedMemoryDataSource class
Date Fri, 29 Oct 2004 13:00:33 GMT
     [ http://issues.apache.org/jira/browse/AXIS-1584?page=comments#action_54806 ]
     
Ananth Krishna commented on AXIS-1584:
--------------------------------------

Apologies for the delay in replying to this. 

An Array instead of an iterator sounds just fine to me. I have tested the new class and it
works :-)

Would this bug fix be included in 1.2 RC1/RC2 or 1.2 final by any chance. 

would be very useful if it can be included in one of these releases..

Thanks
 Ananth

> ConcurrentModificationException in ManagedMemoryDataSource class
> ----------------------------------------------------------------
>
>          Key: AXIS-1584
>          URL: http://issues.apache.org/jira/browse/AXIS-1584
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2 Beta
>  Environment: Windows XP, SUSE 9.0
>     Reporter: Ananth Krishna
>     Assignee: Davanum Srinivas
>  Attachments: bugfixMMDS.zip, diff.txt, stackTraceNOrgSource.zip
>
> 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..

-- 
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


Mime
View raw message