User: patriot1burke
Date: 01/06/18 07:55:49
Modified: src/main/org/jboss/ejb/plugins EntityInstanceCache.java
Log:
changed canPassivate signature back to original canPassivate(ctx).
Sorry, it was a bad decision to begin with...
In passivation, do check for CacheKeys not being equal within AbstractInstanceCache
instead. In the previous version, if CacheKeys were not equal, PassivatorJob
would check to see if canPassivate was false, if so, re-insert the ctx back
into the cache. This was a no-no.
Revision Changes Path
1.7 +2 -12 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.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- EntityInstanceCache.java 2001/06/17 14:58:14 1.6
+++ EntityInstanceCache.java 2001/06/18 14:55:49 1.7
@@ -21,7 +21,7 @@
*
* @author Simone Bordet ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class EntityInstanceCache
extends AbstractInstanceCache
@@ -113,12 +113,7 @@
{
m_container.getInstancePool().free(ctx);
}
- /**
- * (Bill Burke> added key parameter so that canPassivate
- * can verify that the object being passivated is really the
- * same object and hasn't already been freed then re-used.
- */
- protected boolean canPassivate(Object key, EnterpriseContext ctx)
+ protected boolean canPassivate(EnterpriseContext ctx)
{
if (ctx.isLocked())
{
@@ -128,11 +123,6 @@
else if (ctx.getTransaction() != null)
{
return false;
- }
- // (Bill Burke)make sure we're passivating the right object!
- else if (!((EntityEnterpriseContext)ctx).getCacheKey().equals(key))
- {
- return false;
}
return true;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development