Package org.jboss.ejb3.test.interceptors.proxy

Examples of org.jboss.ejb3.test.interceptors.proxy.MyInterface.sayHi()


   public void testCreate() throws NamingException
   {
      Greeter21Home home = lookup("Greeter21Bean/home", Greeter21Home.class);
      Greeter21 bean = home.create();
      String me = new Date().toString();
      String actual = bean.sayHi(me);
      assertEquals("Hi " + me, actual);
   }
}
View Full Code Here


   @Test
   public void testInvocation() throws Exception
   {
      MyStateless21 bean = getRemoteView();
      String now = new Date().toString();
      String actual = bean.sayHi(now);
      assertEquals("Hi " + now, actual);
   }
  
   @Test
   public void testGetHandle() throws Exception
View Full Code Here

  
   private void exercise(GreeterHome home) throws RemoteException, CreateException
   {
      Greeter bean = home.create();
      String name = new Date().toString();
      String actual = bean.sayHi(name);
      assertEquals("Hi " + name, actual);
   }
  
   private void exercise(ValueHolderHome home) throws RemoteException, CreateException
   {
View Full Code Here

   {
      LegacyGreeterHome home = lookup("LegacyGreeterBean/localHome", LegacyGreeterHome.class);

      LegacyGreeterLocal bean = home.create("testCreate");

      String result = bean.sayHi();

      assertEquals("Hi testCreate", result);
   }
}
View Full Code Here

      SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
      SecurityContextAssociation.setSecurityContext(sc);
           
      SecuredGreeter21RemoteHome home = lookup("SecuredGreeter21Bean/home", SecuredGreeter21RemoteHome.class);
      SecuredGreeter21Remote bean = home.create("testAnonymous");
      String result = bean.sayHi();

      assertEquals("Hi testAnonymous (anonymous)", result);
   }

   @Test
View Full Code Here

   {
      login("somebody", null);
     
      SecuredGreeter21RemoteHome home = lookup("SecuredGreeter21Bean/home", SecuredGreeter21RemoteHome.class);
      SecuredGreeter21Remote bean = home.create("testSomebody");
      String result = bean.sayHi();

      assertEquals("Hi testSomebody (somebody)", result);
   }
}
View Full Code Here

      System.out.println("ctx = " + ctx);
      //System.out.println("  " + container.getInitialContext().list("MyStatelessBean").next());
      MyStateful bean = (MyStateful) ctx.lookup("MyStatefulBean/remote");
     
      bean.setName("Me");
      String actual = bean.sayHi();
      assertEquals("Hi Me", actual);
     
      getBootstrap().getKernel().getController().uninstall(containerName);
      Ejb3Registry.unregister(container);
   }
View Full Code Here

      System.out.println("ctx = " + ctx);
      //System.out.println("  " + container.getInitialContext().list("MyStatelessBean").next());
      MyStateful bean = (MyStateful) ctx.lookup("MyStatefulBean/remote");
     
      bean.setName("Me");
      String actual = bean.sayHi();
      assertEquals("Hi Me", actual);
     
      getBootstrap().getKernel().getController().uninstall(containerName);
      Ejb3Registry.unregister(container);
   }
View Full Code Here

      InitialContext ctx = new InitialContext();
      System.out.println("ctx = " + ctx);
      //System.out.println("  " + container.getInitialContext().list("MyStatelessBean").next());
      MyStateless bean = (MyStateless) ctx.lookup("MyStatelessBean/local");
      String actual = bean.sayHi("Me");
      assertEquals("Hi Me", actual);

   }

   // --------------------------------------------------------------------------------||
View Full Code Here

      tm.begin();
      try
      {
         TxSync bean = lookup("TxSyncBean/local", TxSync.class);
         bean.setThrowInAfterCompletion(true);
         bean.sayHi("me");
      }
      finally
      {
         tm.rollback();
      }
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.