Unloaded entities returned in low memory conditions
---------------------------------------------------

         Key: JBAS-1664
         URL: http://jira.jboss.com/jira/browse/JBAS-1664
     Project: JBoss Application Server
        Type: Bug
  Components: EJBs  
    Versions: JBossAS-3.2.6 Final    
    Reporter: Arto Huusko


In low memory conditions (that is, when OutOfMemoryExceptions are seen 
frequently all over the place), JBoss can behave wrong in a way that is 
critically wrong.

I have seen on several occasions that a finder returns an entity with the 
correct identity, but where ejbLoad() has either not been called at all, or 
where ejbLoad() has failed at some point (I have no way of knowing which is the 
case).

I have observed this behaviour only with BMP beans (and so there is a 
possibility that I am doing something wrong in the BMP code, but I doubt this). 
However, the fact that I haven't seen this with CMP beans may be just because 
CMP beans work differently, or just plain luck. When this occurs, the wrong 
behaviour can be seen because the instance variables of the entity bean contain 
what ever they had when the entity instance was previously attached to some 
other identity.

For example, I may store the primary key of the entity in some instance 
variable. Let's say I can access the primary key via method "Long 
getMyPrimaryKey()". If the finder returns an entity with the correct identity 
(what I asked for in the finder call), but where ejbLoad() is not called or it 
fails, then

   entity.getMyPrimaryKey().equals(entity.getPrimaryKey())

is false. And this is exactly what I have seen.

I have no idea where the problem is, and, as I said above, it may be a problem 
with my code.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to