1 45 package org.openejb.test.stateless; 46 47 48 54 public class StatelessJndiTests extends BasicStatelessTestClient{ 55 56 public StatelessJndiTests(){ 57 super("JNDI."); 58 } 59 60 public void test01_initialContext(){ 61 try{ 62 assertNotNull("The InitialContext reference is null.", initialContext); 63 } catch (Exception e){ 64 fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); 65 } 66 } 67 68 public void test02_Jndi_lookupHome(){ 69 try{ 70 Object obj = initialContext.lookup("client/tests/stateless/BasicStatelessHome"); 71 ejbHome = (BasicStatelessHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatelessHome.class); 72 assertNotNull("The EJBHome is null", ejbHome); 73 } catch (Exception e){ 74 fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); 75 } 76 } 77 78 79 84 85 } 86 | Popular Tags |