Anonymous | Login | Signup for a new account | 12-17-2024 08:46 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0005779 | [Resin] | block | always | 07-23-14 02:47 | 09-10-14 13:59 | ||||
Reporter | azuo_lee | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 4.0.40 | ||||||
Summary | 0005779: The behavior of AsyncListener.onTimeout doesn't conform to the Servlet 3.0 Spec. | ||||||||
Description |
Per servlet 3.0 spec. section 2.3.3.3, it should be legal to invoke AsyncContext.dispatch() within a AsyncListener.onTimeout() handler, but currently the resin server complains: 14-07-23 17:08:29.402 [resin-port-8080-22] WARNING com.caucho.network.listen.TcpSocketLink - java.lang.IllegalStateException: async dispatch is not valid outside of an async cycle. Current state: REQUEST at com.caucho.network.listen.SocketLinkRequestState.toAsyncWake(SocketLinkRequestState.java:361) at com.caucho.network.listen.TcpSocketLink.requestWakeComet(TcpSocketLink.java:717) at com.caucho.network.listen.TcpAsyncController.wake(TcpAsyncController.java:114) at com.caucho.server.http.AsyncContextImpl.dispatch(AsyncContextImpl.java:244) at com.quizzy.tourstory.ping.ActiveClients$ClientAsyncListener.complete(ActiveClients.java:251) at com.quizzy.tourstory.ping.ActiveClients$ClientAsyncListener.onTimeout(ActiveClients.java:232) at com.caucho.server.http.AsyncListenerNode.onTimeout(AsyncListenerNode.java:71) at com.caucho.server.http.AsyncContextImpl.onTimeout(AsyncContextImpl.java:333) at com.caucho.network.listen.TcpAsyncController.timeout(TcpAsyncController.java:143) at com.caucho.network.listen.TcpSocketLink.handleResumeTask(TcpSocketLink.java:1087) at com.caucho.network.listen.CometResumeTask.doTask(CometResumeTask.java:47) at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:110) at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93) at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169) at com.caucho.network.listen.TcpSocketResumeThread.run(TcpSocketResumeThread.java:62) at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173) at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) Further more, if neither AsyncContext.complete() nor AsyncContext.dispatch() is invoked within any AsyncListener.onTimeout() handler, the container should send back a 500 error to the client, but currenlty the resin server simply drops the connection? Above rules should also be applied to AsyncLisener.onError() handler. |
||||||||
Additional Information |
Servlet 3.0 spec. section 2.3.3.3: In the event that an asynchronous operation times out, the container must run through the following steps: * Invoke the AsyncListener.onTimeout method on all the AsyncListener instances registered with the ServletRequest on which the asynchronous operation was initiated. * If none of the listeners called AsyncContext.complete() or any of the AsyncContext.dispatch methods, perform an error dispatch with a status code equal to HttpServletResponse.SC_INTERNAL_SERVER_ERROR. * If no matching error page was found, or the error page did not call AsyncContext.complete() or any of the AsyncContext.dispatch methods, the container MUST call AsyncContext.complete(). |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed. 27 unique queries executed. |