This commit is contained in:
Dejan Bosanac 2014-04-24 16:05:42 +02:00
parent f70dc74312
commit ec35588e56
2 changed files with 4 additions and 17 deletions

View File

@ -145,16 +145,11 @@ public class TransportLogger extends TransportFilter {
return next.toString();
}
/**
* We need to override this method
* so that we can unregister the associated
* MBean to avoid a memory leak.
*/
public void finalize() throws Throwable {
@Override
public void stop() throws Exception {
super.stop();
if (view != null) {
view.unregister();
view.unregister();
}
}
}

View File

@ -1627,14 +1627,6 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
started.set(false);
}
@Override
public void finalize() throws Throwable{
Scheduler s = this.scheduler;
if (s != null){
s.stop();
}
}
/**
* Changes the associated username/password that is associated with this
* connection. If the connection has been used, you must called cleanup()