axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bjorn Townsend (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error
Date Fri, 20 Oct 2006 16:49:35 GMT
    [ http://issues.apache.org/jira/browse/AXIS-2574?page=comments#action_12443896 ] 
            
Bjorn Townsend commented on AXIS-2574:
--------------------------------------

Steve,

Does this problem still occur when using the latest version of Axis (1.4)?

Thanks,
Bjorn

> Reading an attachment (slowly) can cause resource deleted error
> ---------------------------------------------------------------
>
>                 Key: AXIS-2574
>                 URL: http://issues.apache.org/jira/browse/AXIS-2574
>             Project: Apache Axis
>          Issue Type: Bug
>          Components: Basic Architecture
>    Affects Versions: 1.2.1
>            Reporter: Steve Sowerby
>
> When reading the data from an attachment we periodically get the following error:
> java.io.IOException: Resource has been deleted.
>  at org.apache.axis.attachments.ManagedMemoryDataSource$Instream.read(ManagedMemoryDataSource.java:688)
> Having run this throught a debugger and had a brief look at the code it seems to me there
is a race condition of sorts.
> The MemoryManagedDataSource that provides the InputStream has been marked as deleted
by the finalize method of AttachmentPart.
> So basically if the client doesn't read off the attachment fast enough then the writer
will have finished and the AttachmentPart gets finalized and blam, you've got a deleted MemoryManagedDataSource.
> I'm not sure what the best fix is.  Perhaps the deletion should actually be some reference
count rather than a simple boolean.  That way the MemoryManagedDataSource gets deleted once
all the writers and readers are done?  Although perhaps then there would be an issue if the
client was very slow to even open the attachment?

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message