> FileLock works only within a single JVM.
On Mon, 16 Jul 2007 01:18:00 GMT, Esmond Pitt
<esmond.pitt@nospam.bigpond.com> wrote, quoted or indirectly quoted
someone who said :
>On the contrary, it *doesn't* work within a single JVM: 'File locks are
>held on behalf of the entire Java virtual machine. They are not suitable
>for controlling access to a file by multiple threads within the same
>virtual machine.'
I had to read that several times before it made sense. Just what good
ARE these fool things then?

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Twisted - 16 Jul 2007 04:26 GMT
On Jul 15, 10:29 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Mon, 16 Jul 2007 01:18:00 GMT, Esmond Pitt
> <esmond.p...@nospam.bigpond.com> wrote, quoted or indirectly quoted
[quoted text clipped - 7 lines]
> I had to read that several times before it made sense. Just what good
> ARE these fool things then?
Why, they're completely useless, of course.
Esmond Pitt - 16 Jul 2007 05:19 GMT
> I had to read that several times before it made sense. Just what good
> ARE these fool things then?
They work where the platform works. They work on Windows, including over
an SMB network. They work where Unix advisory locking works, which
apparently generally *doesn't* include NFS.
alejandrina - 16 Jul 2007 15:38 GMT
On Jul 15, 10:29 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Mon, 16 Jul 2007 01:18:00 GMT, Esmond Pitt
> <esmond.p...@nospam.bigpond.com> wrote, quoted or indirectly quoted
[quoted text clipped - 10 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com
We ran the above code on a multi-processor Linux box, to great
success. It says to me it does work on multiple JVMs, and it's
probably what it's designed for.