Skip to content

Commit

Permalink
updating ShutdownManager calls after bootique/bootique#346
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed Dec 6, 2023
1 parent 269cde8 commit 8c7fb70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/bootique/jcache/JCacheFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public CacheManager createManager(Map<String, Configuration<?, ?>> configs, Shut
"You must place a JCache 1.0 provider on classpath explicitly.", e);
}

shutdownManager.addShutdownHook(provider);
shutdownManager.onShutdown(provider);

CacheManager manager = getConfigUri().map(u -> provider.getCacheManager(u, null)).orElse(provider.getCacheManager());
shutdownManager.addShutdownHook(manager);
shutdownManager.onShutdown(manager);

// now load contributed configs
configs.forEach(manager::createCache);
Expand Down

0 comments on commit 8c7fb70

Please sign in to comment.