-
Notifications
You must be signed in to change notification settings - Fork 316
Closed
Description
Lars Hvile opened SWS-754 and commented
afterCompletion's javadoc states that it will be called on any outcome of endpoint invocation, allowing for proper resource cleanup. There is however a case where handleRequest() successfully completes, but afterCompletion() is never invoked. This happens whenever an exception occurs and no EndpointExceptionResolver is able to resolve the exception.
// within dispatch()'s last catch block
catch (Exception ex) {
Object endpoint = mappedEndpoint != null ? mappedEndpoint.getEndpoint() : null;
processEndpointException(messageContext, endpoint, ex); // exception is rethrown here..
triggerHandleResponse(mappedEndpoint, interceptorIndex, messageContext);
triggerAfterCompletion(mappedEndpoint, interceptorIndex, messageContext, ex); // .. and afterCompletion() is never invoked
}
Affects: 2.0.4
Issue Links:
- In v 2.1.0, dispatch method of MessageDispatcher does not call processEndpointException method if response schema validation fails [SWS-824] #792 In v 2.1.0, dispatch method of MessageDispatcher does not call processEndpointException method if response schema validation fails
Referenced from: commits 6bd78f3
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug