Package org.jboss.ejb3.core.test.ejbthree670

Examples of org.jboss.ejb3.core.test.ejbthree670.MyStateful21.sayHello()


  
   private MyStateful runMyStatefulTest() throws NamingException
   {
      MyStateful session = (MyStateful) getInitialContext().lookup("MyStatefulBean/remote");
      session.setName("Test");
      String actual = session.sayHello();
      assertEquals("Hi Test", actual);
      try
      {
         session.remove();
      }
View Full Code Here


   public void test21() throws Exception
   {
      MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/home");
      MyStateful21 session = home.create();
      session.setName("Test");
      String actual = session.sayHello();
      assertEquals("Hi Test", actual);
      try
      {
         session.remove();
      }
View Full Code Here

   public void testRemoveByHandle() throws Exception
   {
      MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/home");
      MyStateful21 session = home.create();
      session.setName("Test");
      String actual = session.sayHello();
      assertEquals("Hi Test", actual);
      try
      {
         home.remove(session.getHandle());
      }
View Full Code Here

      Object obj = ctx.lookup("MyStatefulBean/home");
      MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
      //MyStateful bean1 = (MyStateful) PortableRemoteObject.narrow(obj, MyStateful.class);
      MyStateful bean1 = home.create();
      bean1.setName("bean1");
      String response = bean1.sayHello();
      assertEquals("Hello bean1", response);
      bean1.remove();
   }
  
   public void testGetEJBHome() throws Exception
View Full Code Here

      assertNotNull(primaryKey);
     
      home.remove(primaryKey);
      try
      {
         session.sayHello();
         fail("should throw an exception");
      }
      catch(Exception e)
      {
         // TODO: check exception (NoSuchEJBException)
View Full Code Here

      MyStateful session = home.create();
      session.setName("Me");
      home.remove(session.getHandle());
      try
      {
         session.sayHello();
         fail("should throw an exception");
      }
      catch(Exception e)
      {
         // TODO: check exception (NoSuchEJBException)
View Full Code Here

   {
      InitialContext ctx = getInitialContext();
      Object obj = ctx.lookup("MyServiceBean/remote");
      MyStateful bean1 = (MyStateful) PortableRemoteObject.narrow(obj, MyStateful.class);
      bean1.setName("bean1");
      String response = bean1.sayHello();
      assertEquals("Hello bean1", response);
   }
  
   public void testTxPropegation() throws Exception
   {
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.