• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

Hi! I have a default cache configured to be replicated.

Its configuration:

If I shutdown the cacheManager one ReplicationThread stays alive. If I remove the replication of the default cache there’s no thread left.

Best regards

Martin Sourceforge Ticket ID: 1802513 - Opened By: martinkirchner - 26 Sep 2007 07:48 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320 Originator: NO

Martin

The replication thread gets started when the replicating cacheEventListener gets created. The default cache is never initialised because it is really just a template, but the CacheEventListeners do not have init.

The simple answer is to explicitly add defaultCache to the shutdown process.

I have added some code to my RMICacheReplicatorTest’s tearDown method:

    List threads = JVMUtil.enumerateThreads();
    for (int i = 0; i < threads.size(); i++) {
        Thread thread = (Thread) threads.get(i);
        if (thread.getName().equals("Replication Thread")) {
            fail("There should not be any replication threads running after shutdown");
        }
    }

This code failed due to the problem you reported but now passes.

The fix will shortly be in trunk and will be in ehcache-1.4.0-beta2.

Thanks for the bug report.

Regards Greg Luck Comment by: gregluck - 25 Dec 2007 19:58 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira