hanicz commented on code in PR #1053:
URL: https://github.com/apache/knox/pull/1053#discussion_r2129051063


##########
gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/shirorealm/KnoxCacheManager.java:
##########
@@ -99,16 +108,54 @@ private synchronized org.ehcache.Cache<Object, Object> 
createCache(String name)
 
   private org.ehcache.CacheManager ensureCacheManager() throws 
MalformedURLException {
     if (manager == null) {
-      manager = CacheManagerBuilder.newCacheManager(getConfiguration());
-      manager.init();
+      XmlConfiguration xmlConfiguration = getConfiguration();
+      manager = CacheManagerBuilder.newCacheManager(xmlConfiguration);
+      try {
+        manager.init();
+      } catch (StateTransitionException e) {

Review Comment:
   Other issues could cause StateTransitionException as well. Since this is our 
only retry mechanic I don't see a point identifying the cause. We could only 
determine it from the error message however I don't think that's reliable since 
it could change with jdk versions for example.  



-- 
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

Reply via email to