spring-boot/spring-boot-project
Andy Wilkinson 61e11cd361 Ensure that TCCL is clean when DataSource is accessed
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
2022-09-16 16:24:57 +01:00
..
spring-boot Compile against SnakeYAML 1.32 and test against older versions 2022-09-15 11:55:44 +01:00
spring-boot-actuator Update tests to allow them to run on Java 19 2022-09-09 16:46:14 +01:00
spring-boot-actuator-autoconfigure Build with Gradle 7.5 while still supporting Gradle 6.8+ 2022-09-09 15:13:43 +01:00
spring-boot-autoconfigure Ensure that TCCL is clean when DataSource is accessed 2022-09-16 16:24:57 +01:00
spring-boot-cli Upgrade to Groovy 3.0.12 2022-08-09 10:56:41 +01:00
spring-boot-dependencies Upgrade to Spring HATEOAS 1.4.5 2022-09-16 07:39:56 +02:00
spring-boot-devtools Log allocated port when Livereload server is using an ephemeral port 2022-08-04 11:45:39 +01:00
spring-boot-docs Document support for Java 19 2022-09-16 11:37:14 +01:00
spring-boot-parent Compile against SnakeYAML 1.32 and test against older versions 2022-09-15 11:55:44 +01:00
spring-boot-properties-migrator
spring-boot-starters Fix links in documentations 2022-08-01 21:07:36 +01:00
spring-boot-test Update copyright year for "Fix typos in code and documentation" 2022-07-26 12:08:30 +01:00
spring-boot-test-autoconfigure Upgrade to Spring Java Format 0.0.34 2022-06-24 12:57:52 +01:00
spring-boot-tools Update tests to allow them to run on Java 19 2022-09-09 16:46:14 +01:00