1 25 26 package org.objectweb.jonas.jtests.clients.entity; 27 28 import javax.naming.NamingException ; 29 import javax.rmi.PortableRemoteObject ; 30 import junit.framework.Test; 31 import junit.framework.TestSuite; 32 import org.objectweb.jonas.jtests.beans.ebasic.SimpleHome; 33 34 40 public class F_IsolationEB extends A_Isolation { 41 42 private static String BEAN_HOME = "ebasicSimpleEBHome"; 43 protected static SimpleHome home = null; 44 45 public F_IsolationEB(String name) { 46 super(name); 47 } 48 49 public SimpleHome getHome() { 50 if (home == null) { 51 try { 52 home = (SimpleHome) PortableRemoteObject.narrow(ictx.lookup(BEAN_HOME), SimpleHome.class); 53 } catch (NamingException e) { 54 fail("Cannot get bean home"); 55 } 56 } 57 return home; 58 } 59 60 65 protected void setUp() { 66 super.setUp(); 67 } 68 69 72 public static Test suite() { 73 return new TestSuite(F_IsolationEB.class); 74 } 75 76 public static void main (String args[]) { 77 String testtorun = null; 78 for (int argn = 0; argn < args.length; argn++) { 80 String s_arg = args[argn]; 81 Integer i_arg; 82 if (s_arg.equals("-n")) { 83 testtorun = args[++argn]; 84 } 85 } 86 if (testtorun == null) { 87 junit.textui.TestRunner.run(suite()); 88 } else { 89 junit.textui.TestRunner.run(new F_IsolationEB(testtorun)); 90 } 91 } 92 } 93 | Popular Tags |