Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2160

LoggingOutInterceptor logs message twice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.3, 2.1.4, 2.2
    • 2.1.5, 2.2.1
    • Core
    • None

    Description

      The LoggingOutInterceptor logs every outbound message twice. This was caused by CXF-1778 which added the following code to the onClose() method of the LoggingCallback class in LoggingOutInterceptor.java:

      try

      { //empty out the cache cos.lockOutputStream(); cos.resetOut(null, false); }

      catch (Exception ex)

      { //ignore }


      message.setContent(OutputStream.class,
      origStream);

      When CachedOutputStream.lockOutputStream() is called, it calls onClose() on each of the callbacks registered on the CachedOutputStream. This causes LoggingCallback.onClose to get called again because the CachedOutputStream that is being locked is the same one that is being closed.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            psavage Patrick Savage
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: