1 25 26 package org.objectweb.jonas.jtests.clients.session; 27 28 import javax.rmi.PortableRemoteObject ; 29 30 import junit.framework.Test; 31 import junit.framework.TestSuite; 32 33 import org.objectweb.jonas.jtests.beans.local.Target; 34 import org.objectweb.jonas.jtests.beans.local.TargetSLHome; 35 36 39 public class F_ClientViewNoTxSL extends A_ClientView { 40 41 protected static String BEAN_HOME = "EJB/localSimpleSessionSLHome"; 42 protected static TargetSLHome home = null; 43 44 public F_ClientViewNoTxSL(String name) { 45 super(name); 46 } 47 48 52 public void testIsIdenticalOnBeans() throws Exception { 53 Target tr1 = getHome().create(); 54 Target tr2 = getHome().create(); 55 assertTrue(tr1.isIdentical(tr2)); 56 tr1.remove(); 57 tr2.remove(); 58 } 59 60 64 protected void setUp() { 65 super.setUp(); 66 useBeans("local", false); 67 } 68 69 public TargetSLHome getHome() throws Exception { 70 if (home == null) { 71 home = (TargetSLHome) PortableRemoteObject.narrow(ictx.lookup(BEAN_HOME), TargetSLHome.class) ; 72 } 73 assertTrue(home != null); 74 return home; 75 } 76 77 public static Test suite() { 78 return new TestSuite(F_ClientViewNoTxSL.class); 79 } 80 81 82 83 public static void main (String args[]) throws Exception { 84 String testtorun = null; 85 for (int argn = 0; argn < args.length; argn++) { 87 String s_arg = args[argn]; 88 Integer i_arg; 89 if (s_arg.equals("-n")) { 90 testtorun = args[++argn]; 91 } 92 } 93 if (testtorun == null) { 94 junit.textui.TestRunner.run(suite()); 95 } else { 96 97 junit.textui.TestRunner.run(new F_ClientViewNoTxSL(testtorun)); 98 99 } 100 } 101 } 102 | Popular Tags |