Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 13863 invoked from network); 18 Aug 2007 21:43:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Aug 2007 21:43:59 -0000 Received: (qmail 58141 invoked by uid 500); 18 Aug 2007 21:43:56 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 58055 invoked by uid 500); 18 Aug 2007 21:43:56 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 58046 invoked by uid 99); 18 Aug 2007 21:43:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Aug 2007 14:43:56 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Aug 2007 21:44:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D5B1D714201 for ; Sat, 18 Aug 2007 14:43:30 -0700 (PDT) Message-ID: <12849725.1187473410872.JavaMail.jira@brutus> Date: Sat, 18 Aug 2007 14:43:30 -0700 (PDT) From: "Oliver Zeigermann (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (TRANSACTION-12) Use NIO for file copying/moving MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TRANSACTION-12?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oliver Zeigermann resolved TRANSACTION-12. ------------------------------------------ Resolution: Fixed Copying and moving not benefits from NIO. > Use NIO for file copying/moving > ------------------------------- > > Key: TRANSACTION-12 > URL: https://issues.apache.org/jira/browse/TRANSACTION-12 > Project: Commons Transaction > Issue Type: Wish > Affects Versions: 1.2 > Reporter: Holger Hoffst=C3=A4tte > Fix For: 2.0 > > Attachments: moveByRenameAndNIO.txt > > > The Mule project (http://mule.codehaus.org/) is considering adoption of c= ommons-transaction for (among other things) file transactions. Unfortunatel= y inspection of the code reveals that FileHelper copies files in the slowes= t possible way (traditional Java I/O via Input/OutputStreams). Since some o= f our users move lots and/or large files (hundreds of megabytes to gigabyte= s) we implemented file moving by rename (atomic and obviously very fast whe= n source and target are on the same filesystem) and NIO as backup strategy = (a lot less CPU usage). > Attached is a code snippet that outlines the procedure; it would be cool = if c-tx could adopt a similar strategy for moving via rename-first and copy= via NIO. I do not know if and how this might conflict with c-tx's "transac= tional" behaviour and recovery but then again it is just a suggestion. :-) --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.