[jboss-jira] [JBoss JIRA] (WFLY-11970) SFSB memory leak due to Date() usage

Paul Ferraro (Jira) issues at jboss.org
Thu Apr 11 15:42:00 EDT 2019


    [ https://issues.jboss.org/browse/WFLY-11970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13721315#comment-13721315 ] 

Paul Ferraro commented on WFLY-11970:
-------------------------------------

{quote}I was assuming the use of Date().getTime() and System.currentTimeMillis() was so that the lastAccessed timestamp would be valid on failover on a different system{quote}

Yeah, nevermind.  We can't use System.nanoTime() for lastAccessedTime, since different members can have different origin times.

> SFSB memory leak due to Date() usage
> ------------------------------------
>
>                 Key: WFLY-11970
>                 URL: https://issues.jboss.org/browse/WFLY-11970
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 11.0.0.Final
>            Reporter: Dennis Reed
>            Assignee: Paul Ferraro
>            Priority: Critical
>
> SFSB tracks expiration with "new Date().getTime()" and "System.currentTimeMillis()".
> But the expiration threads are scheduled (inside JDK classes) with System.nanoTime().
> If the expiration task runs before the bean is considered expired, the expiration check fails and the bean is never expired.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list