Package org.jboss.ejb3.pool

Examples of org.jboss.ejb3.pool.Pool.release()


      {
         Thread.currentThread().setContextClassLoader(classloader);
         StatefulCache cache = this.getCache();
         StatefulBeanContext ctx = cache.create(initTypes, initValues);
         // Since we return the key here, the context is not in use.
         cache.release(ctx);
         Object id = ctx.getId();
         assert id instanceof Serializable : "SFSB Session IDs must be " + Serializable.class.getSimpleName();
         return (Serializable) id;
      }
      finally
View Full Code Here


      {
         Thread.currentThread().setContextClassLoader(classloader);
         StatefulCache cache = this.getCache();
         StatefulBeanContext ctx = cache.create(initTypes, initValues);
         // Since we return the key here, the context is not in use.
         cache.release(ctx);
         Object id = ctx.getId();
         assert id instanceof Serializable : "SFSB Session IDs must be " + Serializable.class.getSimpleName();
         return (Serializable) id;
      }
      finally
View Full Code Here

      {
         Thread.currentThread().setContextClassLoader(classloader);
         StatefulCache cache = this.getCache();
         StatefulBeanContext ctx = cache.create(initTypes, initValues);
         // Since we return the key here, the context is not in use.
         cache.release(ctx);
         Object id = ctx.getId();
         assert id instanceof Serializable : "SFSB Session IDs must be " + Serializable.class.getSimpleName();
         return (Serializable) id;
      }
      finally
View Full Code Here

      {
         container.popContext();
         ejb.setTargetObject(null);
         ejb.setBeanContext(null);
         if (discard) pool.discard(ctx);
         else pool.release(ctx);
      }
   }
}
View Full Code Here

      {
         container.popContext();
         //ejb.setTargetObject(null);
         ejb.setBeanContext(null);
         if (discard) pool.discard(ctx);
         else pool.release(ctx);
      }
   }
}
View Full Code Here

      {
         container.popContext();
         //ejb.setTargetObject(null);
         ejb.setBeanContext(null);
         if (discard) pool.discard(ctx);
         else pool.release(ctx);
      }
   }
}
View Full Code Here

/*    */     {
/* 74 */       container.popContext();
/* 75 */       ejb.setTargetObject(null);
/* 76 */       ejb.setBeanContext(null);
/* 77 */       if (discard) pool.discard(ctx); else
/* 78 */         pool.release(ctx);
/*    */     }
/*    */   }
/*    */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
View Full Code Here

      Container container = new MockContainer();
      int maxSize = -1;
      int timeout = -1;
      pool.initialize(container, maxSize, timeout);
      BeanContext ctx = pool.get();
      pool.release(ctx);
     
      ctx = null;
     
      gc();
      assertEquals(0, pool.getRemoveCount());
View Full Code Here

     
      BeanContext ctx = pool.get();

      assertEquals(0, pool.getAvailableCount());

      pool.release(ctx);
      ctx = null;

      assertEquals(1, pool.getAvailableCount());

      pool.destroy();
View Full Code Here

      Runnable r = new Runnable()
      {
         public void run()
         {
            BeanContext ctx = pool.get();
            pool.release(ctx);
           
            ctx = null;
            used++;
         }
      };
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.