[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2436) Session-scoped SFSB which holds entities leaks memory

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Mar 14 14:58:28 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2436?page=comments#action_12402998 ] 
            
Pete Muir commented on JBSEAM-2436:
-----------------------------------

What I don't understand is *where* you expect the entities to get destroyed? Clearly you are holding a strong reference to them in your session bean, so they won't be garbage collected until the session is timed out. And it sounds to me, from this bug report, that this happens.

I'm still not really following you I'm afraid:

"If you have a session-scoped SFSB which holds entites, the entities do not get destroyed."

Can you clarify? The entities don't get destroyed when the SFSB is destroyed?

"So in production where many instances of the SFSB is created this leads to OutOfMemoryException IF the session timeout is not set to 2 minutes,"

Ok, are you sure this is just because the session has not timed out yet?

"because then the instances will be destroyed(!)."

Just to clarify this sentence - you are saying the OOME occurs if the timeout is set longer than 2 minutes? And if you set it to 2 minutes the OOME occurs, because the SFSB is destroyed after 2 minutes and the hard references are lost so the garbage collection can occur.

"I have investigated this for many many hours and watched the number of entities just growing"

And here is the heart of what I don't understand. What does this mean. How are the entities just growing? Do you mean the number being held by the JVM seen through a profiler? Or the number inside your ObjectPool is increasing (magically as you have no code to do this)?

So, the question boils down to this:

Do the entity references stay around longer than the SFSB references? If so, this is possibly a bug, otherwise definitely not.


 If this is the case, please try with Seam POJOs. If it is ok with Seam POJOs, then we need to move this issue to the EJBTHREE JIRA.

> Session-scoped SFSB which holds entities leaks memory
> -----------------------------------------------------
>
>                 Key: JBSEAM-2436
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2436
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: EJB3
>    Affects Versions: 2.0.0.GA
>         Environment: Suse Linux, JBoss 4.2.2.GA, Java 1.6.03, PostgreSQL 8.2
>            Reporter: Susanne Jarl
>         Assigned To: Pete Muir
>             Fix For: 2.1.0.GA
>
>
> Session-scoped SFSB which has entities in an object does not get destroyed. It leads to memory leak  in production. Please read: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=126542
> The problem appeared after upgrading to Seam 2.0.0.GA. My code worked fine in Seam 1.2.1. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list