I just ran into this issue and since the original submitter has not provided feedback, I decided to post my findings.
The cited documentation is at least somewhat incorrect, in that OCFS2 lock support is not quite as cut and dried as the documentation suggests. Moreover, the documentation makes incorrect references to the supported lock types for OCFS2.
Reference , Section III (New Features) item 10 (Clustered flock(2)) on page 12, states that "the flock(2) call is now cluster-aware." It notes further that "Support for clustered POSIX file locks, also known as lockf(3) or fcntl(2), has not yet been added."
The documentation cited in this issue should therefore be written as "OCFS2 only supports locking with 'flock' and not 'lockf' nor 'fcntl' [...]".
Internally, it appears that Java uses lockf/fcntl or (on some UNIX platforms in some circumstances) mmap/futex to implement locks. Either of these mechanisms are effectively POSIX locks, and would not be supported on OCFS2 according to .
That said, reference  in a section entitled "Cluster aware POSIX file locks" states that POSIX lockf/fctrl is supported by OCFS2 as of Linux Kernel 2.6.28, but that "Due to the group communication required to make these locks coherent, a userspace cluster is required."
I'm not sure what a "userspace cluster" is, but apparently the default O2CB cluster stack used on my system is a "kernel cluster" and thus does not support POSIX locks. That said, I think if I had a userspace cluster, ActiveMQ's shared file system master/slave would be supported.
I wrote a C program to test all of the various lock types on my configuration, along with a simple Java program that uses a FileLock obtained from a FileChannel. Others might find this useful in testing their configurations. You can get the source from .