View | Details | Raw Unified | Return to bug 49937
Collapse All | Expand All

(-)java/org/apache/catalina/core/AsyncContextImpl.java (-1 / +12 lines)
Lines 17-22 Link Here
17
package org.apache.catalina.core;
17
package org.apache.catalina.core;
18
18
19
import java.io.IOException;
19
import java.io.IOException;
20
import java.lang.reflect.InvocationTargetException;
20
import java.security.AccessController;
21
import java.security.AccessController;
21
import java.security.PrivilegedAction;
22
import java.security.PrivilegedAction;
22
import java.util.ArrayList;
23
import java.util.ArrayList;
Lines 24-29 Link Here
24
import java.util.concurrent.atomic.AtomicBoolean;
25
import java.util.concurrent.atomic.AtomicBoolean;
25
import java.util.concurrent.atomic.AtomicReference;
26
import java.util.concurrent.atomic.AtomicReference;
26
27
28
import javax.naming.NamingException;
27
import javax.servlet.AsyncContext;
29
import javax.servlet.AsyncContext;
28
import javax.servlet.AsyncEvent;
30
import javax.servlet.AsyncEvent;
29
import javax.servlet.AsyncListener;
31
import javax.servlet.AsyncListener;
Lines 242-254 Link Here
242
            throws ServletException {
244
            throws ServletException {
243
        T listener = null;
245
        T listener = null;
244
        try {
246
        try {
245
             listener = clazz.newInstance();
247
             listener = (T) context.getInstanceManager().newInstance(clazz.getName(), clazz.getClassLoader());
246
        } catch (InstantiationException e) {
248
        } catch (InstantiationException e) {
247
            ServletException se = new ServletException(e);
249
            ServletException se = new ServletException(e);
248
            throw se;
250
            throw se;
249
        } catch (IllegalAccessException e) {
251
        } catch (IllegalAccessException e) {
250
            ServletException se = new ServletException(e);
252
            ServletException se = new ServletException(e);
251
            throw se;
253
            throw se;
254
        } catch (ClassNotFoundException e) {
255
            ServletException se = new ServletException(e);
256
            throw se;
257
        } catch (NamingException e) {
258
            ServletException se = new ServletException(e);
259
            throw se;
260
        } catch (InvocationTargetException e) {
261
            ServletException se = new ServletException(e);
262
            throw se;
252
        }
263
        }
253
        return listener;
264
        return listener;
254
    }
265
    }
(-)java/org/apache/catalina/core/ApplicationContext.java (+5 lines)
Lines 38-43 Link Here
38
import javax.naming.Binding;
38
import javax.naming.Binding;
39
import javax.naming.NamingException;
39
import javax.naming.NamingException;
40
import javax.naming.directory.DirContext;
40
import javax.naming.directory.DirContext;
41
import javax.servlet.AsyncListener;
41
import javax.servlet.Filter;
42
import javax.servlet.Filter;
42
import javax.servlet.FilterRegistration;
43
import javax.servlet.FilterRegistration;
43
import javax.servlet.RequestDispatcher;
44
import javax.servlet.RequestDispatcher;
Lines 1305-1310 Link Here
1305
            context.addApplicationLifecycleListener(t);
1306
            context.addApplicationLifecycleListener(t);
1306
            match = true;
1307
            match = true;
1307
        }
1308
        }
1309
1310
        if (t instanceof AsyncListener) {
1311
            match = true;
1312
        }
1308
        
1313
        
1309
        if (match) return;
1314
        if (match) return;
1310
        
1315
        
(-)java/org/apache/catalina/Context.java (+2 lines)
Lines 26-31 Link Here
26
import javax.servlet.ServletContext;
26
import javax.servlet.ServletContext;
27
import javax.servlet.descriptor.JspConfigDescriptor;
27
import javax.servlet.descriptor.JspConfigDescriptor;
28
28
29
import org.apache.tomcat.InstanceManager;
29
import org.apache.catalina.deploy.ApplicationParameter;
30
import org.apache.catalina.deploy.ApplicationParameter;
30
import org.apache.catalina.deploy.ErrorPage;
31
import org.apache.catalina.deploy.ErrorPage;
31
import org.apache.catalina.deploy.FilterDef;
32
import org.apache.catalina.deploy.FilterDef;
Lines 1217-1221 Link Here
1217
     */
1218
     */
1218
    public boolean getPaused();
1219
    public boolean getPaused();
1219
1220
1221
    public InstanceManager getInstanceManager();
1220
}
1222
}
1221
1223

Return to bug 49937