F.E. this code doesn't invoke AsyncListener.onError(AsyncEvent), though it must have been invoked according to the answer:
Code: Select all
ac.start(new Runnable() {
public void run() {
throw new RuntimeException();
}
});
The spec says:
Thus AsyncListener.onError(AsyncEvent) will be invoked only if dispatch() method has been called and an exception occurs during its processing. It seems to be logically since error handling works only in container managed thread.Any errors or exceptions that may occur during the execution of the dispatch
methods MUST be caught and handled by the container as follows:
i. invoke the AsyncListener.onError(AsyncEvent)
...