Status: Resolved (View Workflow)
Affects Version/s: 11.0.0.Final
If an asynchronous invocation of an ejb method throws an application exception (declared exception) then the returned future will always return false on isDone(). That means: the client will never know that the operation has finished (unscuccessfully) unless get() is called which would rethrow the original exception.
This behavior has changed from wildfly 10.1.0.Final to 11.0.0.Final.
I pretty sure that the problem is in org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.
The isDone Method is implemented like this:
But status can be one of:
And and exception sets the status to
So it's pretty obvious.
The javadoc on java.util.concurrent.Future states:
Completion may be due to normal termination, an exception, or cancellation – in all of these cases, this method will return true.
So the isDone() method should look more like this:
In wildfly 10, there was a single boolean variable "done" which was set to true in all three cases:
- setResult(...) and