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.