[ 
https://issues.apache.org/jira/browse/DIRECTMEMORY-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284061#comment-13284061
 ] 

Jeff MAURY commented on DIRECTMEMORY-84:
----------------------------------------

No, I didn't test on a real tomcat. I will check. This ha been done using the 
unit tests provided with DirectMemory that use embedded Tomcat. But I'm not 
sure this is related to the embedded core. Googling prooves it's a very old 
issue (http://markmail.org/message/rb5fxtufwrlggnyd).
                
> Cache should not be a private DirectMemoryServlet field and initialized in 
> init methods
> ---------------------------------------------------------------------------------------
>
>                 Key: DIRECTMEMORY-84
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-84
>             Project: Apache DirectMemory
>          Issue Type: Bug
>          Components: REST Server
>    Affects Versions: 0.6.0
>            Reporter: Jeff MAURY
>              Labels: REST, memory_leak
>             Fix For: 0.6.0
>
>
> The cache should not be a private DirectMemoryServlet field as there is 
> nothing per the Servlet spec that prevents the Servlet container to hold 
> several instances of the same servlet class. This may lead to memory 
> consumption (as the cache may be created several times) and unexpected 
> behaviour (as one instance may put the object in ITS cache and another one 
> try to retrieve it and either no finding it or returning another object !!!!).
> It should be a Servlet context attribute and managed through the 
> ServletContextListener pattern.
> As soon as I have completed the work i'm doing on the Closeable stuff, I'm 
> will submit the fix

--
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

        

Reply via email to