[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2009-08-25 Thread Rune Slinning (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747676#action_12747676
 ] 

Rune Slinning commented on AXIS-2574:
-

I am using Axis 1.4 and my project is halted due to this issue.

I'm new to patching. Does anyone have a binary axis.jar (1_4) where this patch 
is incorporated, or could anyone tell me how I can path it myself.

Please help me out.


> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
>Assignee: Jochen Wiedmann
> Attachments: axis-2574.patch, Call.diff, Call.diff, Call.java
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2009-08-10 Thread Santu Ghosh (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741610#action_12741610
 ] 

Santu Ghosh commented on AXIS-2574:
---

I have the axis-2574.patch downloaded, also I have Axis1.4.jar. Now I want to 
replace the old Call.java by new Call.java. The following import class are not 
found. Do I need to add any depenadnt jar?
import org.apache.axis.wsa.WSAConstants ;
import org.apache.axis.wsa.MIHeader ;
import org.apache.axis.wsa.EndpointReference ;getting 

> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
>Assignee: Jochen Wiedmann
> Attachments: axis-2574.patch, Call.diff, Call.diff, Call.java
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-11-03 Thread Himanshu Arora (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644662#action_12644662
 ] 

Himanshu Arora commented on AXIS-2574:
--

Also, can you please pass me the exact path for source code, may be I'm not 
using the correct source code.
I downloaded version 1.4 final from 
http://ws.apache.org/axis/java/releases.html


> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: axis-2574.patch, Call.diff, Call.diff, Call.java
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-11-03 Thread Himanshu Arora (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644661#action_12644661
 ] 

Himanshu Arora commented on AXIS-2574:
--

Hi Jochen, 
I'm new to patching, I did following but got exception.

D:\Projects\axis-src-1_4\axis-1_4\src\org\apache\axis\client>patch -d . -u -N 
--verbose  Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: axis-2574.patch, Call.diff, Call.diff, Call.java
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-10-23 Thread Himanshu Arora (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642137#action_12642137
 ] 

Himanshu Arora commented on AXIS-2574:
--

Hi Rodrigo, 

I tried the options you mentioned above but still i m getting same error, is it 
possible for you to pass me the jars you produced so that i can check the issue 
with them as well.

> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff, Call.java
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-10-03 Thread Rodrigo Ruiz (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636573#action_12636573
 ] 

Rodrigo Ruiz commented on AXIS-2574:


The patch is for the svn trunk version of Axis 1.4. I did not tested with the 
1.4 release branch.

I have just checked the patch (the one of 10KB size) in a fresh working copy, 
and it worked for me. Make sure you apply the patch from the same directory 
where Call.java is.

> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-10-02 Thread Ajay Shenoy (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636404#action_12636404
 ] 

Ajay Shenoy commented on AXIS-2574:
---

I think this diff doesnt work for the final axis1.4 src. Can you please guide 
me?
Thanks
Ajay

> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-10-02 Thread Ajay Shenoy (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636373#action_12636373
 ] 

Ajay Shenoy commented on AXIS-2574:
---

I used the GNUWin32 patch tool to do this and got the following error
C:\Documents and Settings\shenoa\Desktop\patch>patch -u -N  --verbose  Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-10-02 Thread Ajay Shenoy (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636362#action_12636362
 ] 

Ajay Shenoy commented on AXIS-2574:
---

I am trying to apply the patch but I am getting the following line
$ pwd
/home/ShenoA/patch/axis-src-1_4/axis-1_4/src/org/apache/axis/client
$ patch -d . < /home/ShenoA/patch/Call.diff
  Looks like a unified context diff.
  I can't seem to find a patch in there anywhere.

I am new to applying patches, Can someone tell me what I am doing wrong and 
what is the correct command ?

> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-09-03 Thread Rodrigo Ruiz (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628018#action_12628018
 ] 

Rodrigo Ruiz commented on AXIS-2574:


The issue is not fixed. The patch I uploaded is for Axis 1.4.

> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-09-03 Thread Ajay Shenoy (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628012#action_12628012
 ] 

Ajay Shenoy commented on AXIS-2574:
---

We are getting the same error as above. 
Can someone confirm if it is fixed in Axis 1.4 or we ourselves have to modify 
the Call.java class as mentioned above to fix this issue?


> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2008-05-30 Thread Richard Ziegler (JIRA)

[ 
https://issues.apache.org/jira/browse/AXIS-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601169#action_12601169
 ] 

Richard Ziegler commented on AXIS-2574:
---

I'm commenting to confirm that the patch worked for me.  Thanks!

> Reading an attachment (slowly) can cause resource deleted error
> ---
>
> Key: AXIS-2574
> URL: https://issues.apache.org/jira/browse/AXIS-2574
> Project: Axis
>  Issue Type: Bug
>  Components: Basic Architecture
>Affects Versions: 1.2.1
>Reporter: Steve Sowerby
> Attachments: Call.diff, Call.diff
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2006-11-07 Thread Edith Birrer (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS-2574?page=comments#action_12447835 ] 

Edith Birrer commented on AXIS-2574:


Concerning the problem with the deleted resources, I found something which 
could give a hint about what a solution could be.
By the way, this is now in Axis 1.4 . (I found a way around the problem 
mentioned in AXIS-2585 - used the missing class "stolen" from Axis 1.3).

To track the creation and deletion of the attachments, I used remote debugging 
from Eclipse into Tomcat and set a breakpoint in 
AttachmentPart.(DataHandler) and one in AttachmentPart.dispose() [or in 
AttachmentImpl.dispose() ]. Additionally I watched the data flow in 
SOAP-Monitor.

For the findings it is important to understand the environment; here a short 
description.
I have server which runs two webservices: 
-- The "main" webservice receives requests which contain a data file (in a 
DataHandler) and stores them in a queue. (It can also deliver the result of the 
request back to the caller, but this is not important for now). 
-- The "queue" webservice is called by "workers" which use it to take requests 
from the queue, work on them and give the result back to the queue.


So the the story of a request is as follows:
1. The request object (containing a DataHandler) is sent to the webservice: 
Axis transfers the attachment and then may finalize (and delete) it.
2. A worker has nothing to do and requests work from the queue. In the response 
he receives the request object (still containing the DataHandler), so Axis 
again transfers the attachment (but this time it is a send operation and not a 
receive). 
3. The worker works on it, creates two result files and attaches them to the 
request object. Then the whole thing is transferred back to the queue: Axis 
again transfers all attachments (now 3) and then may finalize them. 

AttachmentsImpl has a map of AttachmentPart. Whenever a message is disposed, 
all its Attachments are disposed. The chain is:
MessageContext.dispose() -> Message.dispose() -> AttachmentsImpl.dispose() 
and the latter loops over all AttachmentPart and disposes them.

Now the interesting thing:
Step 1 of the above creates an entry with the id of the DataHandler, and after 
transfer, the AttachmentPart will be deleted. The same object used in step 1 
comes back in step 3. It still contains the same DataHandler, untouched by the 
application. In addition it contains 2 new attachments. Thus, step 3 has to 
transfer 3 attachments. However, for the first Attachment, the corresponding 
AttachmentPart has been deleted in step 1! Axis somehow does not create a new 
one, but just finds that the file (the file in the AxisAttachments directory) 
has been deleted (which is correct). 

I tried the following: As there is no reason to give back in step 3 the 
original data from step 1, I changed the worker: after storing the data file, 
it sets the DataHandler field in the request object to null. So in step 3, only 
the two new attachments have to be transferred. This works, I never get the 
"Resource has been deleted" message!!! (unless I use the debugger to stop all 
calls to AttachmentPart.(DataHandler) and only let through the calls to 
AttachmentPart.dispose() - but in reality this should not happen...)

So to me it looks like a DataHandler can only be transferred once with Axis. If 
you need to transfer the same file again, you have to create a new DataHandler. 
 Or better, check if you re-transfer files which you don't really need to and 
eliminate that.
Peggy, maybe this is also the case in your application?

A DataHandler object can only be transferred once with Axis - I wonder if this 
is the intended behaviour? If it is, shouldn't it be mentioned somewhere? Or if 
it isn't, why does Axis not create again an AttachmentPart for it?


> 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

[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2006-10-31 Thread Edith Birrer (JIRA)
[ 
http://issues.apache.org/jira/browse/AXIS-2574?page=comments#action_12445880 ] 

Edith Birrer commented on AXIS-2574:


I also have this problem (using Axis 1.3, I cannot upgrade to Axis 1.4 because 
of problem AXIS-2585). 
It blocks an important project of ours. Any idea if and when this problem will 
be fixed?

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (AXIS-2574) Reading an attachment (slowly) can cause resource deleted error

2006-10-20 Thread Bjorn Townsend (JIRA)
[ 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]