Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-754

EndpointInterceptor.afterCompletion is not always invoked

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: Core
    • Labels:
      None

      Description

      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.

      MessageDispatcher.java

      // 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
      }

        Issue Links

          Activity

          larshvile Lars Hvile created issue -
          arjen.poutsma Arjen Poutsma made changes -
          Field Original Value New Value
          Assignee Arjen Poutsma [ arjen.poutsma ]
          arjen.poutsma Arjen Poutsma made changes -
          Fix Version/s 2.0.5 [ 12848 ]
          arjen.poutsma Arjen Poutsma made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          arjen.poutsma Arjen Poutsma logged work - 02/May/12 7:09 AM
          • Time Spent:
            47m
             
            <No comment>
          arjen.poutsma Arjen Poutsma made changes -
          Worklog Id 28636 [ 28636 ]
          Time Spent 47m [ 2820 ]
          arjen.poutsma Arjen Poutsma made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Fixed. Thanks for spotting this!

          Show
          arjen.poutsma Arjen Poutsma added a comment - Fixed. Thanks for spotting this!
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing old issues

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing old issues
          arjen.poutsma Arjen Poutsma made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          arjen.poutsma Arjen Poutsma made changes -
          Link This issue is related to SWS-824 [ SWS-824 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          72d 2h 14m 1 Arjen Poutsma 02/May/12 6:22 AM
          In Progress In Progress Resolved Resolved
          47m 55s 1 Arjen Poutsma 02/May/12 7:10 AM
          Resolved Resolved Closed Closed
          1d 23h 53m 1 Arjen Poutsma 04/May/12 7:03 AM

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              larshvile Lars Hvile
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 47m
                47m