1 25 26 package org.objectweb.jonas.jtests.clients.entity; 27 28 import javax.naming.NamingException ; 29 import javax.rmi.PortableRemoteObject ; 30 31 import junit.framework.Test; 32 import junit.framework.TestSuite; 33 34 import org.objectweb.jonas.jtests.beans.ebasic.SimpleHome; 35 36 42 public class G_IsolationEC2 extends B_Isolation { 43 44 private static String BEAN_HOME = "ebasicSimpleEC2Home"; 45 protected static SimpleHome home = null; 46 47 public G_IsolationEC2(String name) { 48 super(name); 49 } 50 51 public void testEmpty() throws Exception { 52 } 53 54 public SimpleHome getHome() { 55 if (home == null) { 56 try { 57 home = (SimpleHome) PortableRemoteObject.narrow(ictx.lookup(BEAN_HOME), SimpleHome.class); 58 } catch (NamingException e) { 59 fail("Cannot get bean home"); 60 } 61 try { 63 home.create("pk1", 10, 4); 64 home.create("pk2", 10, 4); 65 home.create("pk3", 10, 4); 66 home.create("pk4", 40, 8); 67 home.create("pk5", 50, 8); 68 home.create("pk6", 60, 8); 69 home.create("pk7", 70, 8); 70 home.create("pk8", 45, 20); 71 home.create("pk9", 55, 30); 72 home.create("pk10",80, 80); 73 home.create("pk11",80, 80); 74 home.create("pk12",90, 90); 75 home.create("pk13",100, 90); 76 home.create("pk14",110, 90); 77 } catch (Exception i) { 78 } 79 } 80 return home; 81 } 82 83 88 protected void setUp() { 89 super.setUp(); 90 } 91 92 95 public static Test suite() { 96 return new TestSuite(G_IsolationEC2.class); 97 } 98 99 public static void main (String args[]) { 100 String testtorun = null; 101 for (int argn = 0; argn < args.length; argn++) { 103 String s_arg = args[argn]; 104 Integer i_arg; 105 if (s_arg.equals("-n")) { 106 testtorun = args[++argn]; 107 } 108 } 109 if (testtorun == null) { 110 junit.textui.TestRunner.run(suite()); 111 } else { 112 junit.textui.TestRunner.run(new G_IsolationEC2(testtorun)); 113 } 114 } 115 } 116 | Popular Tags |