Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java7 Socket Closed Exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java7 Socket Closed Exception

On Jun 5, 2013, at 4:00 PM, Ben Spink wrote:

Try testing on an empty or much smaller folder?
Java 7 has nio.2 with a polling WatchService implementation on OS X that you might be able to try instead of jxfilewatcher if I'm understanding what thats doing correctly it's similar functionality.

Not really helpful probably but my trz library below includes a OS X kqueue implementation of a nio.2 WatchService. It passed the basic jvm tests but would probably not do well with 4300 files.

4300 is a starter count for the folder...its expected to grow to a rather large data set on 43Tb+, and I believe over 100,000 files even...

I'm going to switch to jpathwatch instead I believe as its tracks more events such as Rename, which is an absolute requirement for me to be able to catch renames.

Not sure if this will prevent the socket closed exceptions...but it might...  There is still a bug with that though it seems in Java 7 on OSX.

The OS X default polling approach while it might not be a first choice would involve 0 open files I'm pretty sure.

For large numbers of files I was planning on writing another nio.2 WatchService using the Apple FSEvents API at some time. It's supposed to be better for a lot of files than kqueue. (Although I think it's based on kqueue). It captures events even when not running I think and some other nice features.
I thought as well about coming up with something for iCloud but thought the API was just a bit limited when I looked at it. You could only access files for your own app. So first I'd have to come up with a iCloud using app…
Then thought I might do something with the Dropbox api's. 
But there wasn't that much interest expressed in the trz package so finally ended up moving onto other things for now.

Would be happy to try working with someone who would like an OS X WatchService with something other than the polling API for a large number of  files or remote files.
Sorry, this one got mostly not helpful and off-topic.

Michael Hall

AppConverter convert Apple jvm to openjdk apps

Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 >Re: Java7 Socket Closed Exception (From: Ben Spink <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.