[jboss-cvs] JBossAS SVN: r112537 - in projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808: src/main/java/org/jboss/ejb3 and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 22 01:44:57 EST 2011


Author: bmaxwell
Date: 2011-12-22 01:44:53 -0500 (Thu, 22 Dec 2011)
New Revision: 112537

Added:
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java
Removed:
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java
Modified:
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/pom.xml
   projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/main/java/org/jboss/ejb3/InfinitePool.java
Log:
[JBPAPP-7808] implement discard method in InfinitePool to release the reference so it doesn't leak memory


Property changes on: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808
___________________________________________________________________
Added: svn:mergeinfo
   + /projects/ejb3/branches/jboss-ejb3-core-1.3:112521

Modified: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/pom.xml
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/pom.xml	2011-12-22 05:22:04 UTC (rev 112536)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/pom.xml	2011-12-22 06:44:53 UTC (rev 112537)
@@ -17,7 +17,7 @@
   <!-- Artifact Information -->
   <artifactId>jboss-ejb3-core</artifactId>
   <packaging>jar</packaging>
-  <version>1.3.8</version>
+  <version>1.3.8_JBPAPP-7808</version>
   <name>JBoss EJB 3.0 Core</name>
   <url>http://labs.jboss.com/jbossejb3</url>
   <description>JBoss EJB 3.0 Core</description>

Modified: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/main/java/org/jboss/ejb3/InfinitePool.java
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/main/java/org/jboss/ejb3/InfinitePool.java	2011-12-22 05:22:04 UTC (rev 112536)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/main/java/org/jboss/ejb3/InfinitePool.java	2011-12-22 06:44:53 UTC (rev 112537)
@@ -90,7 +90,17 @@
       
       super.remove(ctx);
    }
-   
+
+   public void discard(BeanContext<?> ctx)
+   {
+      synchronized (active)
+      {
+         active.remove(ctx);
+      }
+
+      super.discard(ctx);
+   }
+
    public void setMaxSize(int maxSize)
    {
    }

Deleted: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java	2011-12-15 00:29:59 UTC (rev 112521)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java	2011-12-22 06:44:53 UTC (rev 112537)
@@ -1,35 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.core.test.ejbthree2251;
-
-/**
- * Counter
- *
- * @author Jaikiran Pai
- * @version $Revision: $
- */
-public interface Counter
-{
-   void incrementCount();
-
-   int getCount();
-}

Copied: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java (from rev 112521, projects/ejb3/branches/jboss-ejb3-core-1.3/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java)
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java	                        (rev 0)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/Counter.java	2011-12-22 06:44:53 UTC (rev 112537)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb3.core.test.ejbthree2251;
+
+/**
+ * Counter
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface Counter
+{
+   void incrementCount();
+
+   int getCount();
+}

Deleted: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java	2011-12-15 00:29:59 UTC (rev 112521)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java	2011-12-22 06:44:53 UTC (rev 112537)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.core.test.ejbthree2251;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateful;
-
-import org.jboss.ejb3.annotation.CacheConfig;
-
-/**
- * SimpleSFSB
- *
- * @author Brad Maxwell
- * @version $Revision: $
- */
- at Stateful(name="EJBTHREE-2251-SFSB")
- at Remote(Counter.class)
- at CacheConfig(idleTimeoutSeconds = 10, removalTimeoutSeconds=1)
-public class SimpleSFSB implements Counter
-{
-
-   private int count;
-
-   /**
-    * @see org.jboss.ejb3.test.ejbthree2251.Counter#getCount()
-    */
-   public int getCount()
-   {
-      return this.count;
-   }
-
-   /**
-    * @see org.jboss.ejb3.test.ejbthree2251.Counter#incrementCount()
-    */
-   public void incrementCount()
-   {
-      this.count++;
-
-   }
-
-}

Copied: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java (from rev 112521, projects/ejb3/branches/jboss-ejb3-core-1.3/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java)
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java	                        (rev 0)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/SimpleSFSB.java	2011-12-22 06:44:53 UTC (rev 112537)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb3.core.test.ejbthree2251;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateful;
+
+import org.jboss.ejb3.annotation.CacheConfig;
+
+/**
+ * SimpleSFSB
+ *
+ * @author Brad Maxwell
+ * @version $Revision: $
+ */
+ at Stateful(name="EJBTHREE-2251-SFSB")
+ at Remote(Counter.class)
+ at CacheConfig(idleTimeoutSeconds = 10, removalTimeoutSeconds=1)
+public class SimpleSFSB implements Counter
+{
+
+   private int count;
+
+   /**
+    * @see org.jboss.ejb3.test.ejbthree2251.Counter#getCount()
+    */
+   public int getCount()
+   {
+      return this.count;
+   }
+
+   /**
+    * @see org.jboss.ejb3.test.ejbthree2251.Counter#incrementCount()
+    */
+   public void incrementCount()
+   {
+      this.count++;
+
+   }
+
+}

Deleted: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java	2011-12-15 00:29:59 UTC (rev 112521)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java	2011-12-22 06:44:53 UTC (rev 112537)
@@ -1,134 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2011, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.core.test.ejbthree2251.unit;
-
-import junit.framework.Assert;
-
-import org.jboss.ejb3.BeanContext;
-import org.jboss.ejb3.InfinitePool;
-import org.jboss.ejb3.cache.simple.SimpleStatefulCache;
-import org.jboss.ejb3.core.test.common.AbstractEJB3TestCase;
-import org.jboss.ejb3.core.test.ejbthree2251.SimpleSFSB;
-import org.jboss.ejb3.session.SessionContainer;
-import org.jboss.ejb3.stateful.StatefulBeanContext;
-import org.jboss.logging.Logger;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * InfinitePoolUnitTest
- * 
- * Tests the {@link InfinitePool}
- * <p>
- *  More specifically, tests the fix for https://jira.jboss.org/jira/browse/EJBTHREE-2251, where
- *  discard() on the InifinitePool does not release the reference.
- * </p>
- * @author Brad Maxwell
- * @version $Revision: $
- */
-public class InfinitePoolUnitTest extends AbstractEJB3TestCase
-{
-   /**
-    * Logger
-    */
-   private static Logger logger = Logger.getLogger(InfinitePoolUnitTest.class);
-
-   private static InfinitePool infinitePool;
-
-   /**
-    * Container for {@link SimpleSFSB}
-    */
-   private static SessionContainer container;
-
-   /**
-    * A {@link SimpleStatefulCache} for the {@link #container}
-    */
-   private static SimpleStatefulCache cache;
-
-   /**
-    * Deploy the bean, create the container and init/start the cache
-    * @throws Exception
-    */
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      AbstractEJB3TestCase.beforeClass();
-
-      // Deploy the test SLSB
-      // EJBTHREE-2275 - test ejb3 with removal timeout < passivation timeout
-      container = deploySessionEjb(SimpleSFSB.class);
-      cache = new SimpleStatefulCache();
-      cache.initialize(container);
-      cache.start();
-
-      infinitePool = new InfinitePool();
-
-      // maxsize and timeout are not used in AbstractPool
-      infinitePool.initialize(container, 0, 0);
-   }
-
-   /**
-    * Cleanup
-    * @throws Exception
-    */
-   @AfterClass
-   public static void afterClass() throws Exception
-   {
-      cache.stop();
-
-      // Undeploy the test SLSB
-      undeployEjb(container);
-
-      infinitePool.destroy();
-      infinitePool = null;
-
-      AbstractEJB3TestCase.afterClass();
-   }
-
-   /**
-    * Tests that when a {@link StatefulBeanContext} is passivated and later a remove() for that
-    * context is invoked, the {@link SimpleStatefulCache} first activates the session and then
-    * successfully removes it
-    * 
-    * @throws Exception
-    */
-   @Test
-   public void testDiscard() throws Exception
-   {
-      logger.info("Getting an bean context from the InfinitePool, currentSize: " + infinitePool.getCurrentSize());
-      BeanContext ctx = infinitePool.get();
-
-      logger.info("currentSize: " + infinitePool.getCurrentSize() + " after get()");
-
-      int sizeBeforeDiscard = infinitePool.getCurrentSize();
-
-      logger.info("Trying to discard the bean contenxt");
-      infinitePool.discard(ctx);
-
-      if (infinitePool.getCurrentSize() != (sizeBeforeDiscard - 1))
-      {
-         Assert.fail("InfinitePool currentSize is: " + infinitePool.getCurrentSize() + " it should be: "
-               + (sizeBeforeDiscard - 1));
-      }
-   }
-}

Copied: projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java (from rev 112521, projects/ejb3/branches/jboss-ejb3-core-1.3/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java)
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java	                        (rev 0)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.8_JBPAPP-7808/src/test/java/org/jboss/ejb3/core/test/ejbthree2251/unit/InfinitePoolUnitTest.java	2011-12-22 06:44:53 UTC (rev 112537)
@@ -0,0 +1,134 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2011, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb3.core.test.ejbthree2251.unit;
+
+import junit.framework.Assert;
+
+import org.jboss.ejb3.BeanContext;
+import org.jboss.ejb3.InfinitePool;
+import org.jboss.ejb3.cache.simple.SimpleStatefulCache;
+import org.jboss.ejb3.core.test.common.AbstractEJB3TestCase;
+import org.jboss.ejb3.core.test.ejbthree2251.SimpleSFSB;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.stateful.StatefulBeanContext;
+import org.jboss.logging.Logger;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * InfinitePoolUnitTest
+ * 
+ * Tests the {@link InfinitePool}
+ * <p>
+ *  More specifically, tests the fix for https://jira.jboss.org/jira/browse/EJBTHREE-2251, where
+ *  discard() on the InifinitePool does not release the reference.
+ * </p>
+ * @author Brad Maxwell
+ * @version $Revision: $
+ */
+public class InfinitePoolUnitTest extends AbstractEJB3TestCase
+{
+   /**
+    * Logger
+    */
+   private static Logger logger = Logger.getLogger(InfinitePoolUnitTest.class);
+
+   private static InfinitePool infinitePool;
+
+   /**
+    * Container for {@link SimpleSFSB}
+    */
+   private static SessionContainer container;
+
+   /**
+    * A {@link SimpleStatefulCache} for the {@link #container}
+    */
+   private static SimpleStatefulCache cache;
+
+   /**
+    * Deploy the bean, create the container and init/start the cache
+    * @throws Exception
+    */
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      AbstractEJB3TestCase.beforeClass();
+
+      // Deploy the test SLSB
+      // EJBTHREE-2275 - test ejb3 with removal timeout < passivation timeout
+      container = deploySessionEjb(SimpleSFSB.class);
+      cache = new SimpleStatefulCache();
+      cache.initialize(container);
+      cache.start();
+
+      infinitePool = new InfinitePool();
+
+      // maxsize and timeout are not used in AbstractPool
+      infinitePool.initialize(container, 0, 0);
+   }
+
+   /**
+    * Cleanup
+    * @throws Exception
+    */
+   @AfterClass
+   public static void afterClass() throws Exception
+   {
+      cache.stop();
+
+      // Undeploy the test SLSB
+      undeployEjb(container);
+
+      infinitePool.destroy();
+      infinitePool = null;
+
+      AbstractEJB3TestCase.afterClass();
+   }
+
+   /**
+    * Tests that when a {@link StatefulBeanContext} is passivated and later a remove() for that
+    * context is invoked, the {@link SimpleStatefulCache} first activates the session and then
+    * successfully removes it
+    * 
+    * @throws Exception
+    */
+   @Test
+   public void testDiscard() throws Exception
+   {
+      logger.info("Getting an bean context from the InfinitePool, currentSize: " + infinitePool.getCurrentSize());
+      BeanContext ctx = infinitePool.get();
+
+      logger.info("currentSize: " + infinitePool.getCurrentSize() + " after get()");
+
+      int sizeBeforeDiscard = infinitePool.getCurrentSize();
+
+      logger.info("Trying to discard the bean contenxt");
+      infinitePool.discard(ctx);
+
+      if (infinitePool.getCurrentSize() != (sizeBeforeDiscard - 1))
+      {
+         Assert.fail("InfinitePool currentSize is: " + infinitePool.getCurrentSize() + " it should be: "
+               + (sizeBeforeDiscard - 1));
+      }
+   }
+}



More information about the jboss-cvs-commits mailing list