private String handleFileMaker() throws Exception { if (fileMaker.needsInit()) { fileMaker.init(sf.getConfigService().getDatabaseUuid(), readOnly.isReadOnlyRepo()); } String line = null; try { line = fileMaker.getLine(); } catch (OverlappingFileLockException ofle) { InternalRepositoryPrx[] repos = reg.lookupRepositories(); InternalRepositoryPrx prx = null; if (repos != null) { for (int i = 0; i < repos.length; i++) { if (repos[i] != null) { if (repos[i].toString().contains(repoUuid)) { prx = repos[i]; } } } } if (prx == null) { fileMaker.close(); FileMaker newFileMaker = new FileMaker(new File( fileMaker.getDir()).getAbsolutePath()); fileMaker.init(sf.getConfigService().getDatabaseUuid(), readOnly.isReadOnlyRepo()); line = newFileMaker.getLine(); } } return line; }