axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ananth Krishna" ...@it-innovation.soton.ac.uk>
Subject RE: [jira] Commented: (AXIS-1584) ConcurrentModificationException in ManagedMemoryDataSource class
Date Thu, 07 Oct 2004 12:49:40 GMT
 dims,
  Thanks for your comments on the bug/patch I have submitted. I am not
sure if you have had a chance to notice but I have posted the stackTrace
as requested on this bug and also I have commented on it. Hope you find
this useful.

Cheers
 Ananth

> -----Original Message-----
> From: axis-dev@ws.apache.org [mailto:axis-dev@ws.apache.org] 
> Sent: 06 October 2004 12:17
> To: axis-dev@ws.apache.org
> Subject: [jira] Commented: (AXIS-1584) 
> ConcurrentModificationException in ManagedMemoryDataSource class
> 
> The following comment has been added to this issue:
> 
>      Author: Davanum Srinivas
>     Created: Wed, 6 Oct 2004 4:14 AM
>        Body:
> Ananth,
> 
> Can you please post a stack trace? also, won't a simple 
> try/catch around  readers.remove(this); do the trick?
> 
> thanks,
> dims
> ---------------------------------------------------------------------
> View this comment:
>   
> http://issues.apache.org/jira/browse/AXIS-1584?page=comments#a
> ction_53748
> 
> ---------------------------------------------------------------------
> 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: Unassigned
>    Priority: Major
> 
>     Project: Axis
>  Components: 
>              Basic Architecture
>    Versions:
>              1.2 Beta
> 
>    Assignee: 
>    Reporter: Ananth Krishna
> 
>     Created: Mon, 4 Oct 2004 9:06 AM
>     Updated: Wed, 6 Oct 2004 4:14 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
> 
> 

Mime
View raw message