You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by "Jeff MAURY (JIRA)" <ji...@apache.org> on 2012/05/21 22:28:41 UTC
[jira] [Updated] (DIRECTMEMORY-82) CacheService should implement
Closable / Review the livecycle of the
CacheService/MemoryService/ByteBufferAllocator objects
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeff MAURY updated DIRECTMEMORY-82:
-----------------------------------
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
was:
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 not 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
> CacheService should implement Closable / Review the livecycle of the CacheService/MemoryService/ByteBufferAllocator objects
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: DIRECTMEMORY-82
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-82
> Project: Apache DirectMemory
> Issue Type: Bug
> Components: core
> Affects Versions: 0.6.0
> Reporter: Jeff MAURY
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira