Examples of MySession


Examples of org.jboss.ejb3.test.iiop.MySession

      SecurityAssociation.setCredential("password".toCharArray());
     
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("MySessionBean/remote");
      System.err.println(obj.getClass());
      MySession session = (MySession) PortableRemoteObject.narrow(obj, MySession.class);
      assertNotNull(session);
      String me = new Date().toString();
      String response = session.sayHelloTo(me);
      assertEquals("Hi " + me, response);
   }
View Full Code Here

Examples of org.jboss.ejb3.test.iiop.MySession

   public void testGetEJBHome() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("HomedStatelessBean/home");
      HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
      MySession session = home.create();
      Object o = session.getEJBHome();
      HomedStatelessHome home2 = (HomedStatelessHome) PortableRemoteObject.narrow(o, HomedStatelessHome.class);
      // TODO: check home2
   }
View Full Code Here

Examples of org.jboss.ejb3.test.iiop.MySession

   public void testGetHandle() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("HomedStatelessBean/home");
      HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
      MySession session = home.create();
      Handle h = session.getHandle();
      MarshalledObject mo = new MarshalledObject(h);
      Handle h2 = (Handle) mo.get();
      Object o = h2.getEJBObject();
      MySession session2 = (MySession) PortableRemoteObject.narrow(o, MySession.class);
      String me = new Date().toString();
      String response = session2.sayHelloTo(me);
      assertEquals("Hi " + me, response);
   }
View Full Code Here

Examples of org.jboss.ejb3.test.iiop.MySession

   public void testHomedStateless() throws Exception
   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("HomedStatelessBean/home");
      HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
      MySession session = home.create();
      String me = new Date().toString();
      String response = session.sayHelloTo(me);
      assertEquals("Hi " + me, response);
   }
View Full Code Here

Examples of org.jboss.ejb3.test.iiop.MySession

      SecurityAssociation.setCredential("password".toCharArray());
     
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("MySessionBean/remote");
      System.err.println(obj.getClass());
      MySession session = (MySession) PortableRemoteObject.narrow(obj, MySession.class);
      assertNotNull(session);
      String actual = session.getWhoAmI();
      System.err.println("whoAmI = " + actual);
      assertEquals(actual, "somebody");
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.