hanicz commented on code in PR #1053: URL: https://github.com/apache/knox/pull/1053#discussion_r2129303125
########## gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/shirorealm/KnoxCacheManager.java: ########## @@ -113,13 +114,17 @@ private org.ehcache.CacheManager ensureCacheManager() throws MalformedURLExcepti try { manager.init(); } catch (StateTransitionException e) { - LOG.resolvePersistenceDirLockError(e.getMessage()); - this.resolveLockConflict(xmlConfiguration); - if(manager.getStatus() != Status.UNINITIALIZED) { + if(containsOverlappingFileLockException(e)) { + LOG.resolvePersistenceDirLockError(e.getMessage()); + this.resolveLockConflict(xmlConfiguration); + if(manager.getStatus() != Status.UNINITIALIZED) { manager.close(); + } + manager = CacheManagerBuilder.newCacheManager(xmlConfiguration); + manager.init(); + } else { + throw e; Review Comment: No, the 'e' here is the original StateTransitionException. The code only throws it if there was no locking exception in the getCause chain. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org