Re: using lucene Lock inter-jvm

2006-06-21 Thread Yonik Seeley
On 6/21/06, Michael McCandless <[EMAIL PROTECTED]> wrote: Does anyone know of any reasons not to switch Lucene's FSDirectory locking to the java.nio.channels.FileLock? EG, are there any performance issues that people are aware of? It's available since Java 1.4. Good question Michael, no reaso

Re: using lucene Lock inter-jvm

2006-06-21 Thread Michael McCandless
6/20/2006 01:19 PM Please respond to java-user@lucene.apache.org To java-user@lucene.apache.org cc Subject using lucene Lock inter-jvm Hi, I am trying to peruse lucene's Lock for my own purposes, I need to lock several java processes and I thought I could reuse the Lock stuff. I understa

Re: using lucene Lock inter-jvm

2006-06-21 Thread jm
ok, in case somebody has the same problem: The problem is the true value in FSDirectory directory = FSDirectory.getDirectory("C:\\temp\\a", true); it deletes the previous lock file, that belongs to the lock adquired by the first process. Changing it to false prevents the lock being deleted and loc

using lucene Lock inter-jvm

2006-06-20 Thread jm
Hi, I am trying to peruse lucene's Lock for my own purposes, I need to lock several java processes and I thought I could reuse the Lock stuff. I understand lucene locks work across jvm. But I cannot make it work. I tried to reproduce my problem in a small class: public class SysLock { privat