[
https://issues.apache.org/jira/browse/KNOX-3156?focusedWorklogId=971976&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-971976
]
ASF GitHub Bot logged work on KNOX-3156:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jun/25 14:51
Start Date: 05/Jun/25 14:51
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 971976)
Time Spent: 50m (was: 40m)
> Improve Ehcache 3.x
> -------------------
>
> Key: KNOX-3156
> URL: https://issues.apache.org/jira/browse/KNOX-3156
> Project: Apache Knox
> Issue Type: Improvement
> Affects Versions: 2.1.0
> Reporter: Tamás Hanicz
> Assignee: Tamás Hanicz
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> * Add new ability to load Ehcache config file from a file that's not on the
> classpath
> * Knox should resolve lock dir exceptions on its own in case two topologies
> use the same configuration file.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)