Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA03FD137 for ; Wed, 19 Sep 2012 16:48:32 +0000 (UTC) Received: (qmail 93102 invoked by uid 500); 19 Sep 2012 16:48:32 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 93063 invoked by uid 500); 19 Sep 2012 16:48:32 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 93055 invoked by uid 99); 19 Sep 2012 16:48:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2012 16:48:32 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christian.mueller@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qc0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2012 16:48:27 +0000 Received: by qcab12 with SMTP id b12so1238977qca.32 for ; Wed, 19 Sep 2012 09:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=O8RX76c6wTzpX1V7uALjeFQBGBxK51TM65sI54sS35E=; b=NykBOttxdtupgQJ6xMXqF30Nybqmr6W3Rze0Fpx8U+FZ7ha35dT2twDxNXWeLwQ3Tj HMDxzUBKTiE0VSdBXvmgyZBxIo/f3eaQjP7PmEHJQNNzo4EqnQlpA3mlaOuqDCjUiBjV pJApdY9WajTgQiB/n/kSqiST9rb50oVnstKWC3khEJlwpUIF6YZKDJ9oIgf/gznjP7Vf 8S04ftAEocOioHdVpx6yJZ2ho6GqcIqZua1qKOwO+QhH4CgaAUBfN3JAHeCeKXA2wBRe csaNoazjk7dCTKpuW85bFsQKXB/oZKX3cbCWASmNr2mdW/dAtCuX+9P6xlbLQWsQw4H4 pSsA== MIME-Version: 1.0 Received: by 10.224.189.20 with SMTP id dc20mr8267619qab.91.1348073286703; Wed, 19 Sep 2012 09:48:06 -0700 (PDT) Received: by 10.49.63.9 with HTTP; Wed, 19 Sep 2012 09:48:06 -0700 (PDT) Received: by 10.49.63.9 with HTTP; Wed, 19 Sep 2012 09:48:06 -0700 (PDT) In-Reply-To: <1348045196351-5719581.post@n5.nabble.com> References: <1347898685976-5719484.post@n5.nabble.com> <1347962024321-5719517.post@n5.nabble.com> <5058DF2D.1020709@gmail.com> <1348045196351-5719581.post@n5.nabble.com> Date: Wed, 19 Sep 2012 18:48:06 +0200 Message-ID: Subject: Re: File renaming problems under Windows From: =?ISO-8859-1?Q?Christian_M=FCller?= To: users@camel.apache.org Content-Type: multipart/alternative; boundary=20cf303347db62991904ca10c5d8 X-Virus-Checked: Checked by ClamAV on apache.org --20cf303347db62991904ca10c5d8 Content-Type: text/plain; charset=ISO-8859-1 May be Smooks doesn't close the stream in a propper way? Sent from a mobile device Am 19.09.2012 11:00 schrieb "OrackBahama" : > Thanks Mohan, I fully agree with you - besides one point: > > Always checking the return value of the renameTo(...) function call is of > no > use if you can't rely on Windows having completed, flushed and unlocked > everything to disk before returning this value. > > My experience is that even if the return value is TRUE, the underlying > Windows rename operation (or the unlocking) still is incomplete. > > The correct call should have an operating system dependent option such as > "renameToEx(..., WRITE_THROUGH=TRUE)" or > "renameToEx(..., > TELL_WINDOWS_TO_NOT_RETURN_UNLESS_EVERYTHING_IS_FLUSHED_AND_UNLOCKED)" > > Unfortunately - making heavy use of frameworks (Camel -> > org.apache.commons...FileUtils, Smooks, ..) - I have no direct influence on > what happens with IO calls, retry counts, close operations e.g. ...) > > My camel route is as simple as this: > > from( "file://{{w.inbox}}?" > + "initialDelay={{w.polling.init.msec}}" //15000 > + "&delay={{w.polling.msec}}" //25000 > + "&preMove={{w.inbox.pre}}" > + "&move={{w.backup}}/${date:now:yyyy-MM-dd}/${file:onlyname}" > + "&moveFailed={{w.error}}/${date:now:yyyy-MM-dd}/${file:onlyname}" > + "&maxMessagesPerPoll={{w.inbox.maxMsgPerPoll}}" //10 > ) > .log( LoggingLevel.INFO, "imp_protocol", "Importiere Daten : > ${file:onlyname}" ) > .convertBodyTo( StreamSource.class ) > .to( "smooks://smooks-config.xml" ) > ; > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/File-renaming-problems-under-Windows-tp5719484p5719581.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --20cf303347db62991904ca10c5d8--