Author: markt
Date: Wed Mar 30 12:26:39 2011
New Revision: 1086928
URL: http://svn.apache.org/viewvc?rev=1086928&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50991
Stop the resources after they have been unbound rather than before
Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1086928&r1=1086927&r2=1086928&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Wed Mar 30
12:26:39 2011
@@ -5393,10 +5393,6 @@ public class StandardContext extends Con
// Binding thread
ClassLoader oldCCL = bindThread();
- if (namingResources != null) {
- namingResources.stop();
- }
-
try {
// Stop our child containers, if any
@@ -5443,6 +5439,13 @@ public class StandardContext extends Con
fireLifecycleEvent(Lifecycle.CONFIGURE_STOP_EVENT, null);
+ // JNDI resources are unbound in CONFIGURE_STOP_EVENT so it is now
+ // safe to stop the resources which will trigger the close method
if
+ // present
+ if (namingResources != null) {
+ namingResources.stop();
+ }
+
// Stop the Valves in our pipeline (including the basic), if any
if (pipeline instanceof Lifecycle) {
((Lifecycle) pipeline).stop();
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1086928&r1=1086927&r2=1086928&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar 30 12:26:39 2011
@@ -110,6 +110,11 @@
Also prevent the DefaultServlet from setting a content length header
since this too cannot be reliably determined. (markt)
</fix>
+ <fix>
+ <bug>50991</bug>: Fix regression in fix for <bug>25060</bug> that
called
+ close on a JNDI resource while it was still available to the
+ application. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]