: again. I don't think it matters if its the same FileChannel or not - you : just can't use Native Locks within the same JVM, as the lock is held by : the JVM - they are per process - so Lucene does its own little static : map stuff to lock within JVM (simple in memory lock tracking) and uses : the actual Native Lock for multiple JVMs (which is all its good for - : process granularity). But obviously, the in memory locking doesn't work : across webapps.
Assuming I'm understanding all of this correctly, that implies a bug in Lucene's NativeFSLockFactory when used in a multiple classloader type situation -- including any app running in a servlet container. At a minimu, shouldn't NativeFSLock.obtain() be checking for OverlappingFileLockException and treating that as a failure to acquire the lock? -Hoss