If you're using shiro.ini and configuring a $cacheManager instance,
Shiro will call the cacheManager.destroy() method on web app shutdown
(assuming you're using the Shiro 1.2.0 way of starting a web app via
the servlet context <listener>). The EhCacheManager destroy() method
executes the following logic:
try {
net.sf.ehcache.CacheManager cacheMgr = getCacheManager();
cacheMgr.shutdown();
} catch (Exception e) {
if (log.isWarnEnabled()) {
log.warn("Unable to cleanly shutdown implicitly created
CacheManager instance. " +
"Ignoring (shutting down)...");
}
}
Unless you see the warning method, the Ehcache CacheManager.shutdown()
method should be called. Upon looking at that method's JavaDoc
though, perhaps a Shutdown hook might be helpful?
http://ehcache.org/apidocs/net/sf/ehcache/CacheManager.html#shutdown()
I'm not sure if this makes sense for Shiro to set or not. Can you
please set the system property mentioned in the Ehcache JavaDoc and
report if there is an effect?
Regards,
Les
P.S. I noticed there were two previous mails in the Nabble thread that
we did not see. Nabble users, please be aware that you must subscribe
to the Shiro list(s) first before using Nabble, or we'll never see the
messages.
On Mon, Jan 30, 2012 at 3:11 PM, socket70 <[email protected]> wrote:
> Same problem here.
>
> Shiro 1.2.0
> Apache Tomcat 7.0.23
>
> Default configuration for EhCache. In other words, no configuration and it's
> using the internal xml file.
>
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/Unclean-shutdown-of-Tomcat-related-to-EhCacheManager-tp6267587p7238369.html
> Sent from the Shiro User mailing list archive at Nabble.com.