jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yanjie" <yanshaozhi...@gmail.com>
Subject Re: Re: Question about event litener .
Date Tue, 24 Feb 2009 09:23:29 GMT
HI :
Thanks for telling me so much , I only want to know why and I handle it by listen the Event.PROPERT_SET
event, and it works well.



发件人: Alexander Klimetschek 
发送时间: 2009-02-24  17:07:52 
收件人: dev 
主题: Re: Question about event litener . 
On Tue, Feb 24, 2009 at 6:17 AM, yanshaozhiGmail
<yanshaozhi115@gmail.com> wrote:
> I created a event listener to listen the燛vent.NODE_ADD events爁or specified
> path ,and I put a file into repository through webdav ,營n window XP system
> I can get jcr: data爌roperty's data not null燼ll time, however , sometime 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.
Alexander Klimetschek
View raw message