Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 70E2D200B8A for ; Sat, 10 Sep 2016 08:14:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6F780160ACA; Sat, 10 Sep 2016 06:14:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B6BBB160AC2 for ; Sat, 10 Sep 2016 08:14:37 +0200 (CEST) Received: (qmail 87267 invoked by uid 500); 10 Sep 2016 06:14:36 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 87252 invoked by uid 99); 10 Sep 2016 06:14:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Sep 2016 06:14:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 14A28C0C07 for ; Sat, 10 Sep 2016 06:14:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.426 X-Spam-Level: X-Spam-Status: No, score=-0.426 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tJPjpCUEtgTg for ; Sat, 10 Sep 2016 06:14:34 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 8F6F25FB6F for ; Sat, 10 Sep 2016 06:14:33 +0000 (UTC) Received: from asf-bz1-us-mid.priv.apache.org (nat1-us-mid.apache.org [23.253.172.122]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTPS id 68FB6E05CC for ; Sat, 10 Sep 2016 06:14:32 +0000 (UTC) Received: by asf-bz1-us-mid.priv.apache.org (ASF Mail Server at asf-bz1-us-mid.priv.apache.org, from userid 33) id C524D602FE; Sat, 10 Sep 2016 06:14:30 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 57200] SXSSF saving fails sometimes as TempFile creation fails Date: Sat, 10 Sep 2016 06:14:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: SXSSF X-Bugzilla-Version: 3.13-dev X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: onealj@apache.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bz.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 archived-at: Sat, 10 Sep 2016 06:14:38 -0000 https://bz.apache.org/bugzilla/show_bug.cgi?id=57200 --- Comment #11 from Javen O'Neal --- There are a couple suggested strategies in the TempFileCreationStrategy javadocs https://poi.apache.org/apidocs/org/apache/poi/util/TempFileCreationStrategy.html Feel free to subclass TempFileCreationStrategy to something that implements the desired behavior -- store poifiles unsegregated from other system temporary files which are cleaned up by a cron job (I like that solution for a long-running server use case), or have Java do the cleanup either with a timer, a fixed-length container, or something else. Then it's as simple as TempFile.setTempFileCreationStrategy(YourTempFileCreationStrategy). If you need a more flexible solution, you need not restrict yourself to TempFile. We use TempFile and DefaultTempFileCreationStrategy for our unit tests, which is the main purpose for them existing--we never bothered to mark them as @Internal or package-private, but it is unlikely that we would internalize them at this point. I do not see a huge benefit implementing classes that are not specific to handling Microsoft Office files in POI. I would rather see temporary file creation and deletion moved to a general purpose I/O library so that these classes could appeal to a wider audience. Any ideas if such a library exists beyond java.io and java.nio? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org