Package org.apache.catalina

Examples of org.apache.catalina.CometProcessor


        Request request = (Request) req.getNote(ADAPTER_NOTES);
        Response response = (Response) res.getNote(ADAPTER_NOTES);

        if (request.getWrapper() != null) {
           
            CometProcessor servlet = null;

            // Bind the context CL to the current thread
            if (request.getContext().getLoader() != null ) {
                Thread.currentThread().setContextClassLoader
                        (request.getContext().getLoader().getClassLoader());
            }
           
            try {
                servlet = (CometProcessor) request.getWrapper().allocate();
                if (error) {
                    servlet.error(request.getRequest(), response.getResponse());
                } else {
                    if (!servlet.read(request.getRequest(), response.getResponse())) {
                        error = true;
                        try {
                            servlet.error(request.getRequest(), response.getResponse());
                        } catch (Throwable th) {
                            log.error(sm.getString("coyoteAdapter.service"), th);
                        }
                    }
                }
                if (response.isClosed()) {
                    res.action(ActionCode.ACTION_COMET_END, null);
                }
                return (!error);
            } catch (Throwable t) {
                if (!(t instanceof IOException)) {
                    log.error(sm.getString("coyoteAdapter.service"), t);
                }
                error = true;
                try {
                    servlet.error(request.getRequest(), response.getResponse());
                } catch (Throwable th) {
                    log.error(sm.getString("coyoteAdapter.service"), th);
                }
                return false;
            } finally {
View Full Code Here

TOP

Related Classes of org.apache.catalina.CometProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.