Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 17208 invoked from network); 24 Feb 2009 09:07:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Feb 2009 09:07:51 -0000 Received: (qmail 89120 invoked by uid 500); 24 Feb 2009 09:07:50 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 89087 invoked by uid 500); 24 Feb 2009 09:07:50 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 89078 invoked by uid 99); 24 Feb 2009 09:07:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Feb 2009 01:07:50 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aklimets@day.com designates 207.126.148.181 as permitted sender) Received: from [207.126.148.181] (HELO eu3sys201aog001.obsmtp.com) (207.126.148.181) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Feb 2009 09:07:41 +0000 Received: from source ([74.125.78.26]) by eu3sys201aob001.postini.com ([207.126.154.11]) with SMTP ID DSNKSaO4yLy/LiFi6D2GyzkAcvBPFzH4XIsv@postini.com; Tue, 24 Feb 2009 09:07:21 UTC Received: by ey-out-2122.google.com with SMTP id 25so369723eya.51 for ; Tue, 24 Feb 2009 01:07:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.210.112.1 with SMTP id k1mr4237566ebc.31.1235466440302; Tue, 24 Feb 2009 01:07:20 -0800 (PST) In-Reply-To: <200902241317513289577@gmail.com> References: <200902241317513289577@gmail.com> Date: Tue, 24 Feb 2009 10:07:20 +0100 Message-ID: Subject: Re: Question about event litener . From: Alexander Klimetschek To: dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Feb 24, 2009 at 6:17 AM, yanshaozhiGmail wrote: > I created a event listener to listen the=A0Event.NODE_ADD events=A0for sp= ecified > path ,and I put a file into repository through webdav ,=A0In window XP sy= stem > I can get jcr: data=A0property's data not null=A0all time, however , some= time I > can get "jcr: data" with null with mac System ,is there any different > between the to opration system about add file node ? Oh, yes, this can be very tricky. On the Mac, the standard behaviour (either by applications or by the WebDAV filesystem) is something like this IIRC: it creates a separate file with some prefix (I think ".filename" or "~filename") where the content is actually stored, then makes the real file "filename" empty (that's why you get an empty jcr:data sometimes) and finally moves the "~filename" file to "filename". I can imagine other WebDAV fs clients have similar quirks. To work around that, you could wait for some time after you got the events, remember just the path, and then handle it later, when the file is no longer changing. Regards, Alex --=20 Alexander Klimetschek alexander.klimetschek@day.com