1 22 package org.jboss.ejb3.test.regression.ejbthree653.unit; 23 24 import java.util.Date ; 25 26 import junit.framework.Test; 27 28 import org.jboss.ejb3.test.regression.ejbthree653.MyStateful21; 29 import org.jboss.ejb3.test.regression.ejbthree653.MyStateful21Home; 30 import org.jboss.test.JBossTestCase; 31 32 38 public class PoolingSLBSTestCase extends JBossTestCase 39 { 40 41 public PoolingSLBSTestCase(String name) 42 { 43 super(name); 44 } 45 46 public void test1() throws Exception 47 { 48 MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/remoteHome"); 49 MyStateful21 session = home.create(); 50 for(int i = 0; i < 1000; i++) 51 { 52 String me = new Date ().toString(); 53 String expected = "Hi " + me; 54 String actual = session.sayHelloTo(me); 55 assertEquals(expected, actual); 56 } 57 } 58 59 public static Test suite() throws Exception 60 { 61 return getDeploySetup(PoolingSLBSTestCase.class, "ejbthree653.jar"); 62 } 63 } 64 | Popular Tags |