incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <>
Subject Re: Best way to fix JMX threads leak in NodeProbe
Date Tue, 26 Oct 2010 16:21:28 GMT
Yes, we should add a close method.
On Oct 26, 2010 9:14 AM, "Bill Au" <> wrote:
> I have discovered a JMX threads leak in NodeProbe. Here is the original
> email thread on the user mailing list:
> NodePorbe creats a JMXConnector but never calls JMXConnector.close(). The
> use of a JMXConnector in NodeProbe is not exposed in its API. So without
> changing the API, my initial thought is to add a finalize() method to
> NodeProbe in which JMXConnector.close() is called. But I am not sure if
> this is the best solution. Using a finalizer many lead to memory leak
> in this case NodeProbe will not be garbage collector until its finalizer
> called, but in Java the finalize() method is not guaranteed to be called
> any particular time. We probably don't want to create a new JMXConnector
> for each operation. Should we add a close() method to NodeProbe which
> of NodeProbe has to call to avoid using a finalizer?
> Bill

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message