LoggingOutInterceptor logs message twice
----------------------------------------

                 Key: CXF-2160
                 URL: https://issues.apache.org/jira/browse/CXF-2160
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.2, 2.1.4, 2.1.3
            Reporter: Patrick Savage
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to