1 22 package org.jboss.test.jca.test; 23 24 import javax.resource.cci.Connection ; 25 26 32 public class UncontendedStickyStressTestCase extends AbstractUncontendedPoolingStressTest 33 { 34 35 protected int getMaxPoolSize() 36 { 37 return getThreadCount(); 38 } 39 40 public boolean isSticky() 41 { 42 return true; 43 } 44 45 public void testIt() throws Throwable 46 { 47 tm.setTransactionTimeout(0); 48 UncontendedPoolingRunnable[] runnables = new UncontendedPoolingRunnable[getThreadCount()]; 49 for (int i = 0; i < runnables.length; ++i) 50 { 51 runnables[i] = new UncontendedPoolingRunnable() 52 { 53 public void doRun() throws Throwable 54 { 55 Connection c = cf.getConnection(); 56 c.close(); 57 } 58 }; 59 } 60 61 runConcurrentTest(runnables, null); 62 } 63 64 public UncontendedStickyStressTestCase(String name) 65 { 66 super(name); 67 } 68 } 69 | Popular Tags |