Author: remy.maucherat(a)jboss.com
Date: 2011-06-24 05:44:19 -0400 (Fri, 24 Jun 2011)
New Revision: 1745
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/webapps/docs/changelog.xml
Log:
- I don't know why I used something based on the context CL, but this is not a good
idea.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2011-06-24 08:36:16 UTC (rev
1744)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2011-06-24 09:44:19 UTC (rev
1745)
@@ -3725,6 +3725,10 @@
if ((loader != null) && (loader instanceof Lifecycle))
((Lifecycle) loader).start();
+ if ((loader != null) && (loader.getClassLoader() != null)) {
+ DirContextURLStreamHandler.bind(loader.getClassLoader(),
getResources());
+ }
+
// Unbinding thread
unbindThread(oldCCL);
@@ -3996,6 +4000,9 @@
if ((logger != null) && (logger instanceof Lifecycle)) {
((Lifecycle) logger).stop();
}
+ if ((loader != null) && (loader.getClassLoader() != null)) {
+ DirContextURLStreamHandler.unbind(loader.getClassLoader());
+ }
if ((loader != null) && (loader instanceof Lifecycle)) {
((Lifecycle) loader).stop();
}
@@ -4200,8 +4207,6 @@
lifecycle.fireLifecycleEvent(BIND_THREAD_EVENT, null);
- DirContextURLStreamHandler.bind(getResources());
-
return oldContextClassLoader;
}
@@ -4212,8 +4217,6 @@
*/
protected void unbindThread(ClassLoader oldContextClassLoader) {
- DirContextURLStreamHandler.unbind();
-
lifecycle.fireLifecycleEvent(UNBIND_THREAD_EVENT, null);
Thread.currentThread().setContextClassLoader(oldContextClassLoader);
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-06-24 08:36:16 UTC (rev 1744)
+++ trunk/webapps/docs/changelog.xml 2011-06-24 09:44:19 UTC (rev 1745)
@@ -16,6 +16,24 @@
<body>
+<section name="JBoss Web 7.0.0.CR4 (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <jboss-jira>AS7-1098</jboss-jira>: Cleanup URL stream handler init by
using
+ the classloader returned loader.getClassLoader(). (remm)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ Improve per thread tagpool cleanup. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.0.CR3 (remm)">
<subsection name="Catalina">
<changelog>
@@ -29,10 +47,6 @@
Allow valves to replace the IS/reader and OS/writer that gets returned to the
applications. (remm)
</update>
- <fix>
- <jboss-jira>AS7-1098</jboss-jira>: Call context classloader unbind
with the right
- classloader. (remm)
- </fix>
</changelog>
</subsection>
<subsection name="Jasper">
Show replies by date