Package org.jboss.ejb3.pool

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


   public void test1()
   {
      Pool pool = new StrictMaxPool();
      int maxSize = 10;
      long timeout = 100;
      pool.initialize(container, maxSize, timeout);
     
      BeanContext<?> ctx = pool.get();
      pool.remove(ctx);
     
      assertEquals(0, pool.getCurrentSize());
View Full Code Here


   public void test2()
   {
      Pool pool = new StrictMaxPool();
      int maxSize = 10;
      long timeout = 100;
      pool.initialize(container, maxSize, timeout);
     
      for(int i = 0; i < maxSize; i++)
         pool.get();
     
      assertEquals(maxSize, pool.getCurrentSize());
View Full Code Here

   public void test3()
   {
      Pool pool = new StrictMaxPool();
      int maxSize = 10;
      long timeout = 100;
      pool.initialize(container, maxSize, timeout);
     
      BeanContext<?> ctxs[] = new BeanContext[maxSize];
      for(int i = 0; i < maxSize; i++)
         ctxs[i] = pool.get();
     
View Full Code Here

   public void test1()
   {
      Pool pool = new StrictMaxPool();
      int maxSize = 10;
      long timeout = 100;
      pool.initialize(container, maxSize, timeout);
     
      BeanContext<?> ctx = pool.get();
      pool.remove(ctx);
     
      assertEquals(0, pool.getCurrentSize());
View Full Code Here

   public void test2()
   {
      Pool pool = new StrictMaxPool();
      int maxSize = 10;
      long timeout = 100;
      pool.initialize(container, maxSize, timeout);
     
      for(int i = 0; i < maxSize; i++)
         pool.get();
     
      assertEquals(maxSize, pool.getCurrentSize());
View Full Code Here

   public void test3()
   {
      Pool pool = new StrictMaxPool();
      int maxSize = 10;
      long timeout = 100;
      pool.initialize(container, maxSize, timeout);
     
      BeanContext<?> ctxs[] = new BeanContext[maxSize];
      for(int i = 0; i < maxSize; i++)
         ctxs[i] = pool.get();
     
View Full Code Here

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

   {
      ThreadlocalPool pool = new ThreadlocalPool();
      Container container = new MockContainer();
      int maxSize = -1;
      int timeout = -1;
      pool.initialize(container, maxSize, timeout);

      assertEquals(0, pool.getAvailableCount());
     
      BeanContext ctx = pool.get();
View Full Code Here

   {
      final ThreadlocalPool pool = new ThreadlocalPool();
      Container container = new MockContainer();
      int maxSize = -1;
      int timeout = -1;
      pool.initialize(container, maxSize, timeout);
     
      Runnable r = new Runnable()
      {
         public void run()
         {
View Full Code Here

   {
      final ThreadlocalPool pool = new ThreadlocalPool();
      Container container = new MockContainer();
      int maxSize = -1;
      int timeout = -1;
      pool.initialize(container, maxSize, timeout);
     
      Runnable r = new Runnable()
      {
         public void run()
         {
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.