Package org.jboss.ejb

Examples of org.jboss.ejb.StatefulSessionPersistenceManager


    * @param maxLifeAfterPassivation the upper bound in milliseconds that an
    * inactive session will be kept.
    */
   protected void removePassivated(long maxLifeAfterPassivation)
   {
      StatefulSessionPersistenceManager store = m_container.getPersistenceManager();
      long now = System.currentTimeMillis();
      log.debug("removePassivated, now="+now+", maxLifeAfterPassivation="+maxLifeAfterPassivation);
      boolean trace = log.isTraceEnabled();
      Iterator entries = passivatedIDs.entrySet().iterator();
      while (entries.hasNext())
      {
         Map.Entry entry = (Map.Entry) entries.next();
         Object key = entry.getKey();
         Long value = (Long) entry.getValue();
         if (value != null)
         {
            long passivationTime = value.longValue();
            if (now - passivationTime > maxLifeAfterPassivation)
            {
               preRemovalPreparation(key);
               store.removePassivated(key);
               if (trace)
                  log(key, passivationTime);
               // Must use iterator to avoid ConcurrentModificationException
               entries.remove();
               postRemovalCleanup(key);
View Full Code Here


/* 186 */     return true;
/*     */   }
/*     */
/*     */   protected void removePassivated(long maxLifeAfterPassivation)
/*     */   {
/* 195 */     StatefulSessionPersistenceManager store = this.m_container.getPersistenceManager();
/* 196 */     long now = System.currentTimeMillis();
/* 197 */     log.debug("removePassivated, now=" + now + ", maxLifeAfterPassivation=" + maxLifeAfterPassivation);
/* 198 */     boolean trace = log.isTraceEnabled();
/* 199 */     Iterator entries = this.passivatedIDs.entrySet().iterator();
/* 200 */     while (entries.hasNext())
/*     */     {
/* 202 */       Map.Entry entry = (Map.Entry)entries.next();
/* 203 */       Object key = entry.getKey();
/* 204 */       Long value = (Long)entry.getValue();
/* 205 */       if (value != null)
/*     */       {
/* 207 */         long passivationTime = value.longValue();
/* 208 */         if (now - passivationTime > maxLifeAfterPassivation)
/*     */         {
/* 210 */           preRemovalPreparation(key);
/* 211 */           store.removePassivated(key);
/* 212 */           if (trace) {
/* 213 */             log(key, passivationTime);
/*     */           }
/* 215 */           entries.remove();
/* 216 */           postRemovalCleanup(key);
View Full Code Here

TOP

Related Classes of org.jboss.ejb.StatefulSessionPersistenceManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.