Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3ECF8636C for ; Fri, 20 May 2011 11:23:30 +0000 (UTC) Received: (qmail 25156 invoked by uid 500); 20 May 2011 11:23:30 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 25129 invoked by uid 500); 20 May 2011 11:23:30 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 25120 invoked by uid 99); 20 May 2011 11:23:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 11:23:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 11:23:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 59756D3687 for ; Fri, 20 May 2011 11:22:47 +0000 (UTC) Date: Fri, 20 May 2011 11:22:47 +0000 (UTC) From: "ext2 (JIRA)" To: issues@cxf.apache.org Message-ID: <1196804079.30240.1305890567363.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <464917236.33800.1304999523138.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CXF-3504) for big attachment, a temporary file is left on disk and keep opend, if the application just close the DataSource's inputStream and doesn't consume it; MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036781#comment-13036781 ] ext2 commented on CXF-3504: --------------------------- @FreeMan Fang: My private temporary fix is quite different;the strategy I am using is: "doesn't make attachments pre cached" but "make delegate input stream always work right"; That's to say if using sun's activation. my private fix will still keep all attachment being delegate inputstream(doesn't cach any one); key fixed as following : 1)avoid recursive calling to DelegateInputStream's close boolean closing = false; DelegateInputStream.close{ if(!closing){ closing = true; is.close(); if (!isClosed && deserializer != null) { deserializer.markClosed(this); } isClosed = true; } } 2) consume all underlying bytes while close MIMEPartInputStream()-->(avoid mis read MIME part: for example, if user just close first attachment, and doesn't read it, then read second attachment) MIMEPartInputStream.close(){ while(read() >= 0) ; } now using sun's activation will be better than geronimo; because the attachment's content will never be cached if user doesnt' care about content of the attachment > for big attachment, a temporary file is left on disk and keep opend, if the application just close the DataSource's inputStream and doesn't consume it; > -------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: CXF-3504 > URL: https://issues.apache.org/jira/browse/CXF-3504 > Project: CXF > Issue Type: Bug > Affects Versions: 2.4 > Reporter: ext2 > Assignee: Freeman Fang > Fix For: 2.4.1, 2.3.5 > > Attachments: CXF-3504-new.patch, CXF-3504.patch, attachment-clean.zip, mtom.wsdl > > > when the client receiving multiple larget attachments from server. here "large" means : attachment size is large enough to be saved as temporary file on disk; > for the last attachment, if the user application only close the input stream got from DataSource and doesn't consume the input stream at all, a temporary file will be left on the disk. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira