[activemq-dev] Is garbage collection working?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[activemq-dev] Is garbage collection working?

Ramzi Saba
It seems to me that we never trigger garbage collection because...

    this.doingGarbageCollection = new SynchronizedBoolean(false);

    private void doGarbageCollection() {
        if (doingGarbageCollection.commit(true, false)) { // this always
evaluates to false, right?
             ...
        }
    }

Should this rather be?

    private void doGarbageCollection() {
        if (doingGarbageCollection.commit(false, true)) {
             ...
        }
    }

This is applicable to both TransientQueueBoundedMessageManager and
DurableQueueBoundedMessageManager.

-ramzi