You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Papp István Péter (JIRA)" <ji...@apache.org> on 2015/01/30 12:32:34 UTC

[jira] [Comment Edited] (CXF-6228) Using XSLTFeature with large messages creates unremovable temporary files

    [ https://issues.apache.org/jira/browse/CXF-6228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14298514#comment-14298514 ] 

Papp István Péter edited comment on CXF-6228 at 1/30/15 11:32 AM:
------------------------------------------------------------------

The bug is consistently reproducible, it appears every time the outgoing message is over the  CachedOutputStream threshold. I've attached a small Maven/Eclipse test project which uses the same dependencies (Spring 3.2.8) as our main project, with the threshold lowered to the absolute minimum; if you call the "returnABigString" method, you will notice that two files are created in the temporary folder. These files remain until server shutdown.
(The WSDL of the service, if using the default Tomcat configuration, is available at: http://localhost:8080/bug6228reproduction/webservices/b6228Service?wsdl )


was (Author: pip25):
The bug is consistently reproducible, it appears every time the outgoing message is over the  CachedOutputStream threshold. I've attached a small Maven/Eclipse test project which uses the same dependencies (Spring 3.2.8) as our main project, with the threshold lowered to the absolute minimum; if you call the "returnABigString" method, you will notice that two files are created in the temporary folder. These files remain until server shutdown.

> Using XSLTFeature with large messages creates unremovable temporary files
> -------------------------------------------------------------------------
>
>                 Key: CXF-6228
>                 URL: https://issues.apache.org/jira/browse/CXF-6228
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.0.3
>            Reporter: Papp István Péter
>            Priority: Minor
>         Attachments: bug6228reproduction.zip
>
>
> Using the XSLT transformation feature causes the outgoing message to use a CachedOutputStream object. If the size of the message is above the configured threshold, a temporary file will be created to store the message on the disk; however, this file is not deleted after the message is sent.
> Based on info available on similar problems encountered with CachedOutputStream and attachments, I tried using an interceptor in the SETUP_ENDING phase to close the stream manually - this, however, did not work because even after closing the stream, the "streamList" variable was not empty, which resulted in the closing logic skipping file deletion in the "maybeDeleteTempFile" method. Attempts to delete the file directly also fail for obvious reasons.
> Some (sometimes all, not sure what makes the difference) of the temporary files are removed during a clean server shutdown, but since this is a rare event in production environments, it does not really solve the problem. (Actually, the issue was discovered when the temp files filled the disk completely on a production server.)
> The only viable workaround I found so far was to set the CachedOutputStream threshold high enough to avoid caching the data to disk altogether.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)