From 8c7fb70ef559b883faeacdeb687b855769663831 Mon Sep 17 00:00:00 2001 From: Andrus Adamchik Date: Wed, 6 Dec 2023 18:53:19 -0500 Subject: [PATCH] updating ShutdownManager calls after bootique/bootique#346 --- src/main/java/io/bootique/jcache/JCacheFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/bootique/jcache/JCacheFactory.java b/src/main/java/io/bootique/jcache/JCacheFactory.java index 02b06ee..21bba02 100644 --- a/src/main/java/io/bootique/jcache/JCacheFactory.java +++ b/src/main/java/io/bootique/jcache/JCacheFactory.java @@ -64,10 +64,10 @@ public CacheManager createManager(Map> 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);