Uploaded image for project: 'Apache DirectMemory'
  1. Apache DirectMemory
  2. DIRECTMEMORY-82

CacheService should implement Closable / Review the livecycle of the CacheService/MemoryService/ByteBufferAllocator objects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.1-incubating
    • 0.2
    • core
    • None

    Description

      I think the CacheService should implement Closable. Each CacheService instance holds a reference to a Timer, which starts an underlying Thread to execute TimerTasks. As there is no way to know when the CacheService is stopped, lots of "zombies" threads will be present in the JVM each time a reference on the CacheService is not kept anymore (start/stop of a Web application, open/close of an HibernateSessionFactory).
      Please note that the patch I submitted for DIRECTMEMORY-81 shows now that lots of Timer-xx threads are now executing and generating traces as several instances of CacheService are created during the tests.
      In general, I think we should review the lifecycle of the CacheService/MemoryService/ByteBufferAllocator objects as only ByteBufferAllocator implements Closable but the close method is never called

      Attachments

        1. DIRECTMEMORY-82.patch
          39 kB
          Jeff Maury

        Activity

          People

            noctarius Christoph Engelbert
            jeffmaury Jeff Maury
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: