FileDocCategorySizeDatePackage
StatefulEvictionPolicy.javaAPI DocJBoss 4.2.12204Fri Jul 13 20:53:48 BST 2007org.jboss.ejb3.cache.tree

StatefulEvictionPolicy

public class StatefulEvictionPolicy extends PassivationEvictionPolicy
Comment
author
Bill Burke
deprecated
Use direct JBossCache passivation now.
version
$Revision: 60645 $

Fields Summary
private static final Logger
log
Constructors Summary
public StatefulEvictionPolicy()


    
   
      super();
   
Methods Summary
public voidevict(org.jboss.cache.Fqn fqn)

      // never allow root node to be evicted
      if (fqn.size() == 2)
      {
         StatefulBeanContext bean = (StatefulBeanContext) cache_.get(fqn, "bean");
         
         if (bean == null)
         {
            super.evict(fqn);
            return;
         }
         synchronized (bean)
         {
            if (bean.isInUse())
            {
               bean.markedForPassivation = true;
               super.evict(fqn);
               return;
            }
            super.evict(fqn);
         }
      }