Previously, when using Tomcat, its web app class loader was the thread context class loader when H2ConsoleAutoConfiguration triggered initialization of Hikari's pool. This was the case because it's done in the bean method of a ServletRegistrationBean. Such Servlet-related beans are intentionally created with Tomcat's web app classloader as the TCCL. This arrangement results in the pool's threads using Tomcat's web app class loader as their TCCL which is not desirable. One consequence of this was that Tomcat could log a warning at shutdown about the thread being left running when it will, in fact, be stopped as part of the context being closed. This commit updates H2ConsoleAutoConfiguration to set the TCCL to its own ClassLoader while the DataSource information is being logged. Closes gh-32382 |
||
---|---|---|
.. | ||
src | ||
build.gradle |