Author: remy.maucherat(a)jboss.com
Date: 2012-02-15 04:14:38 -0500 (Wed, 15 Feb 2012)
New Revision: 1965
Modified:
trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
Log:
Fix requestDestroyed event.
Modified: trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 2012-02-14 12:40:49 UTC
(rev 1964)
+++ trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 2012-02-15 09:14:38 UTC
(rev 1965)
@@ -758,12 +758,12 @@
ClassLoader oldCCL = Thread.currentThread().getContextClassLoader();
ClassLoader contextClassLoader = context.getLoader().getClassLoader();
+ ServletRequestEvent event = null;
+ Object instances[] = context.getApplicationEventListeners();
if (oldCCL != contextClassLoader) {
// Enter application scope
Thread.currentThread().setContextClassLoader(contextClassLoader);
context.getThreadBindingListener().bind();
- Object instances[] = context.getApplicationEventListeners();
- ServletRequestEvent event = null;
if (instances != null && (instances.length > 0)) {
event = new ServletRequestEvent(context.getServletContext(), request);
// create pre-service event
@@ -895,8 +895,6 @@
// Reset the old context class loader
if (oldCCL != null) {
// Exit application scope
- Object instances[] = context.getApplicationEventListeners();
- ServletRequestEvent event = null;
if (instances != null && (instances.length > 0)) {
// create post-service event
for (int i = instances.length - 1; i >= 0; i--) {
Show replies by date