Index: testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/DestroyStatelessBean.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/DestroyStatelessBean.java	(revision 114196)
+++ testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/DestroyStatelessBean.java	(working copy)
@@ -48,6 +48,10 @@
       return beanCount;
    }
    
+   public String getThreadId(){
+       return this.toString();
+   }
+   
    @PostConstruct
    public void construct()
    {
Index: testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/ThreadLocalPoolStatelessBean.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/ThreadLocalPoolStatelessBean.java	(revision 114196)
+++ testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/ThreadLocalPoolStatelessBean.java	(working copy)
@@ -52,4 +52,8 @@
    {
       Thread.sleep(30 * 1000);
    }
+   
+   public String getThreadId(){
+       return this.toString();
+   }
 }
Index: testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/unit/MetricsUnitTestCase.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/unit/MetricsUnitTestCase.java	(revision 114196)
+++ testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/unit/MetricsUnitTestCase.java	(working copy)
@@ -21,10 +21,10 @@
  */
 package org.jboss.ejb3.test.statelesscreation.unit;
 
+import java.util.concurrent.CopyOnWriteArraySet;
 import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 import javax.naming.InitialContext;
-
 import org.jboss.ejb3.test.statelesscreation.DestroyRemote;
 import org.jboss.ejb3.test.statelesscreation.StatelessRemote;
 import org.jboss.logging.Logger;
@@ -39,49 +39,71 @@
 {
    @SuppressWarnings("unused")
    private static final Logger log = Logger.getLogger(MetricsUnitTestCase.class);
+   private CopyOnWriteArraySet<String> poolThreadIntanceSet = new CopyOnWriteArraySet<String>();
 
    public MetricsUnitTestCase(String name)
    {
       super(name);
    }
-   
-   public void testSLSBCount() throws Exception
+
+    class Task implements Runnable {
+        private InitialContext jndiContext;
+        private String type;
+        private Object bean;
+
+        public Task(InitialContext jndiContext, String type) {
+            this.jndiContext = jndiContext;
+            this.type = type;
+        }
+
+        public void run() {
+            try {
+                if (type.equals("DestroyRemote")) {
+                    bean = (DestroyRemote) jndiContext.lookup("DestroyStatelessBean/remote");
+                    synchronized (poolThreadIntanceSet) {
+                        poolThreadIntanceSet.add(((DestroyRemote) bean).getThreadId());
+                    }
+                } else {
+                    bean = (StatelessRemote) jndiContext.lookup("ThreadLocalPoolStatelessBean/remote");
+                    synchronized (poolThreadIntanceSet) {
+                        poolThreadIntanceSet.add(((StatelessRemote) bean).getThreadId());
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+    
+    private void createThreads(final InitialContext jndiContext, int num, String type) throws InterruptedException{
+        Thread threads[] = new Thread[num];
+        if (type.equals("DestroyRemote")) {
+            for (int i = 0; i < threads.length; ++i) {
+                threads[i] = new Thread(new Task(jndiContext, "DestroyRemote"), "Thread " + i);
+                threads[i].start();
+            }
+        } else {
+            for (int i = 0; i < threads.length; ++i) {
+                threads[i] = new Thread(new Task(jndiContext, "StatelessRemote"), "Thread " + i);
+                threads[i].start();
+            }
+        }
+
+        for (Thread t : threads) {
+            t.join(1 * 60 * 1000);
+        }
+    }
+
+    public void testSLSBCount() throws Exception
    {
       DestroyRemote slsb = (DestroyRemote)getInitialContext().lookup("DestroyStatelessBean/remote");
       assertNotNull(slsb);
       assertEquals(1, slsb.getBeanCount());
+      final InitialContext jndiContext = getInitialContext();
       
-      Runnable r = new Runnable()
-      {
-         public void run()
-         {
-            try
-            {
-               InitialContext jndiContext = getInitialContext();
-               for (int i = 0 ; i < 100 ; ++i)
-               {                  
-                  DestroyRemote slsb = (DestroyRemote)jndiContext.lookup("DestroyStatelessBean/remote");              
-                  slsb.getBeanCount();
-               }
-            }
-            catch (Exception e)
-            {
-               e.printStackTrace();
-            }
-         }
-      };
-      Thread threads[] = new Thread[50];
-      for (int i = 0 ; i < threads.length ; ++i)
-      {
-         threads[i] = new Thread(r);
-         threads[i].start();
-      }
+      while(poolThreadIntanceSet.size() < 20)
+          createThreads(jndiContext, 100, "DestroyRemote");
       
-      for(Thread t : threads)
-      {
-         t.join(1 * 60 * 1000);
-      }
-      
       MBeanServerConnection server = getServer();
       ObjectName testerName = new ObjectName("jboss.j2ee:jar=statelesscreation-test.jar,name=DestroyStatelessBean,service=EJB3");
    
@@ -100,6 +122,7 @@
       int createCount = (Integer)server.getAttribute(testerName, "CreateCount");
       System.out.println("CreateCount=" + createCount);
       
+      poolThreadIntanceSet.clear();
       
       assertEquals(20, availableCount);
       assertEquals(20, maxSize);
@@ -140,8 +163,11 @@
       size = (Integer)server.getAttribute(testerName, "CreateCount");
       assertEquals(1, size);
       
-      runConcurrentTests(30, 1);
-      
+      final InitialContext jndiContext = getInitialContext();
+
+      while(poolThreadIntanceSet.size() < 20)
+          createThreads(jndiContext, 100, "StatelessRemote");
+
       currentSize = (Integer)server.getAttribute(testerName, "CurrentSize");
       
       checkMetrics(server, testerName, currentSize, 20, 20, currentSize, 0);
@@ -161,8 +187,11 @@
          }
       }
       
-      runConcurrentTests(30, 1);
-      
+      poolThreadIntanceSet.clear();
+
+      while(poolThreadIntanceSet.size() < 20)
+          createThreads(jndiContext, 100, "StatelessRemote");
+
       currentSize = (Integer)server.getAttribute(testerName, "CurrentSize");
       
       checkMetrics(server, testerName, currentSize, 20, 20, currentSize + 10, 10);
@@ -193,6 +222,8 @@
       int availableCount = (Integer)server.getAttribute(testerName, "AvailableCount");
       System.out.println("AvailableCount=" + availableCount);
       
+      poolThreadIntanceSet.clear();
+      
       assertEquals(maxSize - 1, availableCount);
    }
    
@@ -230,35 +261,6 @@
       
    }
    
-   protected void runConcurrentTests(int numThreads, int sleepSecs) throws Exception
-   {
-      for (int i = 0 ; i < numThreads ; ++i)
-      {
-         Runnable r = new Runnable()
-         {
-            public void run()
-            {
-               try
-               {
-                  StatelessRemote stateless = (StatelessRemote)getInitialContext().lookup("ThreadLocalPoolStatelessBean/remote");                              
-                  for (int i = 0 ; i < 25 ; ++i)
-                  {                  
-                     stateless.test();     
-                  }
-               }
-               catch (Exception e)
-               {
-                  e.printStackTrace();
-               }
-            }
-         };
-         
-         new Thread(r).start();
-      }
-      
-      Thread.sleep(sleepSecs * 60 * 1000);  
-   }
-   
    public static Test suite() throws Exception
    {
       return getDeploySetup(MetricsUnitTestCase.class, "statelesscreation-connectors-service.xml,statelesscreation-test.jar");
Index: testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/StatelessRemote.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/StatelessRemote.java	(revision 114196)
+++ testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/StatelessRemote.java	(working copy)
@@ -31,4 +31,6 @@
    void testException();
    
    void delay() throws Exception;
+   
+   String getThreadId();
 }
Index: testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/DestroyRemote.java
===================================================================
--- testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/DestroyRemote.java	(revision 114196)
+++ testsuite/src/test/java/org/jboss/ejb3/test/statelesscreation/DestroyRemote.java	(working copy)
@@ -27,4 +27,5 @@
 public interface DestroyRemote
 {
    int getBeanCount();
+   String getThreadId();
 }
