Examples of sayHi()


Examples of org.jboss.ejb3.core.test.ejbthree1995.LegacyGreeterLocal.sayHi()

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

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

      String result = bean.sayHi();

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

Examples of org.jboss.ejb3.core.test.ejbthree1995.SecuredGreeter21Remote.sayHi()

      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

Examples of org.jboss.ejb3.core.test.regression.ejbthree1253.MyStateful.sayHi()

      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

Examples of org.jboss.ejb3.core.test.stateless.MyStateless.sayHi()

      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

Examples of org.jboss.ejb3.core.test.txsync.TxSync.sayHi()

      tm.begin();
      try
      {
         TxSync bean = lookup("TxSyncBean/local", TxSync.class);
         bean.setThrowInAfterCompletion(true);
         bean.sayHi("me");
      }
      finally
      {
         tm.rollback();
      }
View Full Code Here

Examples of org.jboss.ejb3.endpoint.deployers.test.simple.Greeter.sayHi()

      Endpoint endpoint = (Endpoint) context.getTarget();
      EndpointInvocationHandler handler = new EndpointInvocationHandler(endpoint, null, Greeter.class);
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      Class<?> interfaces[] = { Greeter.class };
      Greeter bean = (Greeter) Proxy.newProxyInstance(loader, interfaces, handler);
      String result = bean.sayHi("Thingy");
      assertEquals("Hi Thingy from MyStatelessBean", result);
   }

   @Test
   public void testStateful() throws Throwable
View Full Code Here

Examples of org.jboss.ejb3.endpoint.deployers.test.simple.StatefulGreeter.sayHi()

      EndpointInvocationHandler handler = new EndpointInvocationHandler(endpoint, session, businessInterface);
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      Class<?> interfaces[] = { businessInterface };
      StatefulGreeter bean = (StatefulGreeter) Proxy.newProxyInstance(loader, interfaces, handler);
      bean.setName("testStateful");
      String result = bean.sayHi();
      assertEquals("Hi testStateful from MyStatefulBean", result);
   }
}
View Full Code Here

Examples of org.jboss.ejb3.test.interceptors.basic.BasicBean.sayHi()

     
      assertEquals("BasicInterceptor postConstruct must have been called once", 1, BasicInterceptor.postConstructs);
     
      System.out.println(bean.getClass() + " " + bean.getClass().getClassLoader());
      System.out.println("  " + Arrays.toString(bean.getClass().getInterfaces()));
      String result = bean.sayHi("Test");
      System.out.println(result);
     
      assertEquals("sayHi didn't invoke BasicInterceptor.aroundInvoke once", 1, BasicInterceptor.aroundInvokes);
      assertEquals("sayHi didn't invoke BasicBean.aroundInvoke once", 1, BasicBean.aroundInvokes);
     
View Full Code Here

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

      ProxyContainer<ProxiedBean> container = new ProxyContainer<ProxiedBean>("ProxyTestCase", "InterceptorContainer", ProxiedBean.class);
     
      Class<?> interfaces[] = { MyInterface.class };
      MyInterface proxy = container.constructProxy(interfaces);
     
      String result = proxy.sayHi("Me");
      assertEquals("Hi Me", result);

      assertEquals(1, InvocationCounterInterceptor.counter);
   }
}
View Full Code Here

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

      Class<?> interfaces[] = { MyInterface.class };
      MyInterface proxy = container.constructProxy(interfaces);
     
     
      reset(true);
      String result = proxy.sayHi("Me");
      assertEquals("Hi Me", result);
      ProxiedBean bean1hi = Interceptions.getProxiedBean();
      PerInstanceInterceptor pi1hi = Interceptions.getPerInstanceInterceptor();
      PerJoinpointInterceptor pj1hi = Interceptions.getPerJoinpointInterceptor();
      assertEquals(1, Interceptions.getProxiedBeanCalls());
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.