User: patriot1burke
Date: 01/06/13 11:48:56
Modified: src/main/org/jboss/ejb/plugins EntityInstanceCache.java
Log:
use cacheKey.getId() instead of cacheKey.id
Revision Changes Path
1.5 +2 -13 jboss/src/main/org/jboss/ejb/plugins/EntityInstanceCache.java
Index: EntityInstanceCache.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/EntityInstanceCache.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EntityInstanceCache.java 2001/06/11 19:52:26 1.4
+++ EntityInstanceCache.java 2001/06/13 18:48:56 1.5
@@ -20,7 +20,7 @@
* Cache subclass for entity beans.
*
* @author Simone Bordet ([EMAIL PROTECTED])
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class EntityInstanceCache
extends AbstractInstanceCache
@@ -57,17 +57,6 @@
}
EnterpriseContext rtn = null;
rtn = super.get(id);
- //
- // FIXME: (Bill Burke) We were running into problems where CMP EntityBeans
- // were out of sync with the database
- // The problem went away after a few minutes of inactivity leading us to
- // believe that the bean in cache was passivated and the CacheKey was out
- // of sync with the Context's key. So I put this defensive check in to
- // flag the problem.
- if (rtn != null && !rtn.getId().equals(((CacheKey)id).id))
- {
- throw new IllegalStateException("somehow the cache is out of synch
with the context ctx.id != lookup.id");
- }
return rtn;
}
public void remove(Object id)
@@ -102,7 +91,7 @@
protected void setKey(Object id, EnterpriseContext ctx)
{
((EntityEnterpriseContext)ctx).setCacheKey(id);
- ctx.setId(((CacheKey)id).id);
+ ctx.setId(((CacheKey)id).getId());
}
protected Container getContainer() {return m_container;}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development