1 25 package org.objectweb.easybeans.tests.stress.invocation; 26 27 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance; 28 29 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.basic.SFSBStressBean; 30 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.basic.SFSBStressBeanRemote; 31 import org.testng.annotations.BeforeSuite; 32 import org.testng.annotations.Test; 33 34 41 public class TestStatefulThreadSafe { 42 43 46 public static final int NUMBER_LOOKUPS = 3; 47 48 49 52 private SFSBStressBeanRemote bean; 53 54 58 @BeforeSuite 59 public void startUp() throws Exception { 60 bean = getBeanRemoteInstance(SFSBStressBean.class, SFSBStressBeanRemote.class); 61 bean.initValue(); 62 } 63 64 68 @Test(threadPoolSize = NUMBER_LOOKUPS, invocationCount = NUMBER_LOOKUPS) 69 public void testMultipleThreadsCalls() throws Exception { 70 bean.testThreadSafe(); 71 } 72 73 } 74 | Popular Tags |