You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Patrick Savage (JIRA)" <ji...@apache.org> on 2009/04/06 18:56:13 UTC

[jira] Created: (CXF-2160) LoggingOutInterceptor logs message twice

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.


[jira] Resolved: (CXF-2160) LoggingOutInterceptor logs message twice

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2160.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.1
                   2.1.5
         Assignee: Daniel Kulp

Already encountered and fixed on trunk

> 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.1.3, 2.1.4, 2.2
>            Reporter: Patrick Savage
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.1.5, 2.2.1
>
>
> 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.