User: patriot1burke
  Date: 02/01/30 16:06:53

  Modified:    src/main/org/jboss/ejb/plugins AbstractInstanceCache.java
  Log:
  do not grab a reference to a BeanLock on cache insert.  What we're really only saving
  is an allocation of a small BeanLock object and this adds headaches in making sure 
that
  that these BeanLocks are not leaked
  
  Revision  Changes    Path
  1.27      +5 -7      jboss/src/main/org/jboss/ejb/plugins/AbstractInstanceCache.java
  
  Index: AbstractInstanceCache.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/AbstractInstanceCache.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- AbstractInstanceCache.java        2001/12/19 05:35:47     1.26
  +++ AbstractInstanceCache.java        2002/01/31 00:06:51     1.27
  @@ -61,7 +61,7 @@
    * @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
    * @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
    *
  - * @version $Revision: 1.26 $
  + * @version $Revision: 1.27 $
    *
    *   <p><b>Revisions:</b>
    *
  @@ -88,6 +88,10 @@
    * <ol>
    *   <li>Make sure ctx.getID() is non-null when received from unschedulePassivation.
    * </ol>
  + * <p><b>2001/01/29: billb</b>
  + * <ol>
  + *   <li>Do not grab a BeanLock reference when ctx is inserted into cache.  This 
has memory leakage issues
  + * </ol>
    */
   public abstract class AbstractInstanceCache
      implements InstanceCache, XmlLoadable, Monitorable, MetricsConstants
  @@ -264,9 +268,6 @@
               // run without having acquired the cache lock via getCacheLock()
               throw new IllegalStateException("INSERTING AN ALREADY EXISTING BEAN, ID 
= " + key);
            }
  -         //Create a lock in the lock manager, as long as there an instance in cache 
we keep
  -         // the lock in the manager, since get will increase the ref count on the 
lock
  -         getContainer().getLockManager().getLock(key);
         }
      }
      /* From InstanceCache interface */
  @@ -302,9 +303,6 @@
            if (getCache().peek(id) != null)
            {
               getCache().remove(id);
  -            // When we introduced the bean in the cache we used the get to increase 
the lock count
  -            // now we decrease it and if the count is zero the manager will release 
the object from memory
  -            getContainer().getLockManager().removeLockRef(id);
            }
         }
      }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to