• Andy Wilkinson's avatar
    Set main thread's context class loader when starting Tomcat · ff99bb07
    Andy Wilkinson authored
    When an app is deployed to Tomcat, all of the application's startup
    is performed with a WebAppClassLoader being the thread context
    class loader. When an app is using embedded Tomcat, the
    WebAppClassLoader is created as part of the application starting but
    is never set as the thread context class loader. This difference
    in TCCL can cause problems. For example, it breaks the use of JNDI
    during application startup with embedded Tomcat.
    
    This commit updates the embedded Tomcat servlet container to set
    the TCCL to be the WebAppClassLoader once the Tomcat context has
    been started. Once Tomcat is stopped, it sets the TCCL back to the
    ClassLoader that loaded it.
    
    Closes gh-2308
    ff99bb07
Name
Last commit
Last update
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...