YeKaiSquare created CXF-8751:
--------------------------------

             Summary: Thread holding Stream object causes exception / object 
recycling blocking
                 Key: CXF-8751
                 URL: https://issues.apache.org/jira/browse/CXF-8751
             Project: CXF
          Issue Type: Bug
            Reporter: YeKaiSquare


Hi



A non-static inner class will hold a reference to the outer class by default.
The recycling of objects held by the thread will be blocked until the thread is 
interrupted or terminated.
It is dangerous/memory consuming to call the close/destroy method of the Stream 
or bean object on another thread before this.

It is recommended to modify the stream class unnecessarily by internal class 
references to improve memory usage and object recycling.

The classes involved are:
org.apache.cxf.transport.local.LocalConduit$LocalConduitOutputStream

org.apache.cxf.transport.local.LocalDestination$SynchronousConduit$LocalDestinationOutputStream

org.apache.activemq.thread.TaskRunnerFactory

org.apache.cxf.workqueue.OneShotAsyncExecutor

A PR will be submitted if agreed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to