Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package org.jboss.ejb3.cache.tree;
 /*    */ 
 /*    */ import  org.jboss.cache.CacheSPI;
 /*    */ import  org.jboss.cache.Fqn;
 /*    */ import org.jboss.logging.Logger;
 /*    */ 
 /*    */ 

Deprecated:
 
 /*    */ public class StatefulEvictionPolicy extends PassivationEvictionPolicy
/*    */ {
/* 40 */   private static final Logger log = Logger.getLogger(StatefulEvictionPolicy.class);
/*    */ 
/*    */   public void evict(Fqn fqn)
/*    */     throws Exception
/*    */   {
/* 50 */     if (fqn.size() == 2)
/*    */     {
/* 52 */       StatefulBeanContext bean = (StatefulBeanContext)this.cache_.get(fqn, "bean");
/*    */ 
/* 54 */       if (bean == null)
/*    */       {
/* 56 */         super.evict(fqn);
/* 57 */         return;
/*    */       }
/* 59 */       synchronized (bean)
/*    */       {
/* 61 */         if (bean.isInUse())
/*    */         {
/* 63 */           bean.markedForPassivation = true;
/* 64 */           super.evict(fqn);
/* 65 */           return;
/*    */         }
/* 67 */         super.evict(fqn);
/*    */       }
/*    */     }
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.ejb3.cache.tree.StatefulEvictionPolicy
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X