jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From saraheg <sara...@gmail.com>
Subject Re: Issues while importing.
Date Mon, 11 Aug 2008 16:43:38 GMT



public void shutdownRepository(Repository repository){
     if (repository instanceof RepositoryImpl) {
         RepositoryImpl repo = (RepositoryImpl) repository;
         repo.shutdown();
    } else {
        // note unbindrepository is supposed to work, but seems to get and
locking error so here is the workaround
        if (BaseManager.getRepositoryHomeDir()!=null) {
            String repoDir = BaseManager.getRepositoryHomeDir();
            if (!repoDir.endsWith("/")) {
                repoDir += "/";
            }
            File lockFile = new File(repoDir+".lock");
            if (lockFile.exists()) {
                lockFile.delete();
                System.out.println("Deleted "+lockFile.getAbsolutePath()+"
lockfile for restart.");
            }

        }
    }
  }
-- 
View this message in context: http://www.nabble.com/Issues-while-importing.-tp18874536p18929475.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message