[ 
https://issues.apache.org/jira/browse/QPIDJMS-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16087540#comment-16087540
 ] 

ASF subversion and git services commented on QPIDJMS-299:
---------------------------------------------------------

Commit 87a4b1765ffab2a965bbd2a5bfc2289c205d3592 in qpid-jms's branch 
refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-jms.git;h=87a4b17 ]

QPIDJMS-299 Don't create anonymous ThreadFactory instances

Create a simple ThreadFactory object that can be used by
all the various places where we create executors instead
of using anonymous inner class which can carry and retain
references to the creator where no reference is needed.

These dangle references can in some cases keep objects
alive longer than they should be or even indefinitely.


> executor thread factories can retain closed connection objects due to 
> implicit parent references
> ------------------------------------------------------------------------------------------------
>
>                 Key: QPIDJMS-299
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-299
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>            Reporter: Robbie Gemmell
>             Fix For: 0.24.0
>
>
> The client creates various executors, supplying thread factories to set the 
> names and daemon status. It typically does this using an anonymous inner 
> class for the factory, and doing this results in the factory object having an 
> implicit reference to its creating class instance, which in most cases makes 
> them a way to reference the objects for a connection. This can at best make 
> connection objects stick around longer than needed/desired when done with, 
> but at worst during any resource cleanup issues could actually retain the 
> connections related objects indefinitely and exhaust memory if this repeats 
> often enough over time.
> We should create a common thread factory class that can avoid the existing 
> duplicate code and ensure the thread factories don't have the impicit 
> reference to their creators which can lead to undesirable retention.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to