()
| 421 | |
| 422 | |
| 423 | synchronized boolean asyncError() { |
| 424 | Request request = processor.getRequest(); |
| 425 | boolean containerThread = (request != null && request.isRequestThread()); |
| 426 | |
| 427 | if (log.isTraceEnabled()) { |
| 428 | log.trace(sm.getString("asyncStateMachine.asyncError.start")); |
| 429 | } |
| 430 | |
| 431 | clearNonBlockingListeners(); |
| 432 | if (state == AsyncState.STARTING) { |
| 433 | updateState(AsyncState.MUST_ERROR); |
| 434 | } else { |
| 435 | if (hasProcessedError) { |
| 436 | if (log.isTraceEnabled()) { |
| 437 | log.trace(sm.getString("asyncStateMachine.asyncError.skip")); |
| 438 | } |
| 439 | return false; |
| 440 | } |
| 441 | hasProcessedError = true; |
| 442 | if (state == AsyncState.DISPATCHED) { |
| 443 | // Async error handling has moved processing back into an async |
| 444 | // state. Need to increment in progress count as it will decrement |
| 445 | // when the async state is exited again. |
| 446 | asyncCtxt.incrementInProgressAsyncCount(); |
| 447 | updateState(AsyncState.ERROR); |
| 448 | } else { |
| 449 | updateState(AsyncState.ERROR); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | // Return true for non-container threads to trigger a dispatch |
| 454 | return !containerThread; |
| 455 | } |
| 456 | |
| 457 | |
| 458 | synchronized void asyncRun(Runnable runnable) { |
no test coverage detected