They are not really unique. Here are my code to unlock the directory. Notice there are two locks.
public static void unlockDirectory(Directory dir) { Lock dirLock = dir.makeLock(IndexWriter.WRITE_LOCK_NAME); if (dirLock.isLocked()) { logger.debug("unlocking " + dirLock); dirLock.release(); logger.info("unlocked directory " + dir); } dirLock = dir.makeLock(IndexWriter.COMMIT_LOCK_NAME); if (dirLock.isLocked()) { logger.debug("unlocking " + dirLock); dirLock.release(); logger.info("unlocked directory " + dir); } } -- Chris Lu ------------------------- Instant Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com On 3/4/07, MC Moisei <[EMAIL PROTECTED]> wrote:
How do I clear the locks ? THey have unique names and the name changes everytime... Chris Lu wrote: > A safe way to do this is to clear the locks just before starting your > war file. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]