Examples of Hello


Examples of org.jboss.test.hello.interfaces.Hello

      throws Exception
   {
      long start = System.currentTimeMillis();
      long start2 = start;
      HelloHome home = (HelloHome)getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      for (int i = 0 ; i < getIterationCount(); i++)
      {
         hello.helloHello(hello);
      }
      long end = System.currentTimeMillis();
      getLog().debug("Avg. time/call(ms):"+((end-start)/getIterationCount()));
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

   public void testHello()
      throws Exception
   {
      InitialContext ctx = getInitialContext();
      HelloHome home = (HelloHome) ctx.lookup("helloworld/HelloHTTP");
      Hello hello = home.create();
      String reply = hello.hello("World");
      getLog().debug(reply);
      hello.remove();
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

   public void testLoggedHello()
      throws Exception
   {
      InitialContext ctx = getInitialContext();
      HelloHome home = (HelloHome) ctx.lookup("helloworld/HelloHTTP");
      Hello hello = home.create();
      String reply = hello.loggedHello("World");
      getLog().debug(reply);
      hello.remove();

      // Find
      HelloLogHome logHome = (HelloLogHome) ctx.lookup("helloworld/HelloLogHTTP");
      HelloLog log = logHome.findByPrimaryKey("World");
      long start = log.getStartTime();
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

    */
   public void testData()
      throws Exception
   {
      HelloHome home = (HelloHome)getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      HelloData name = new HelloData();
      name.setName("World");
      getLog().debug(hello.howdy(name));
      hello.remove();
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

   public void testSpeed()
      throws Exception
   {
      long start = System.currentTimeMillis();
      HelloHome home = (HelloHome)getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      int count = getIterationCount();
      for (int i = 0 ; i < count; i++)
      {
         hello.hello("Argument#"+i);
      }
      long end = System.currentTimeMillis();
      getLog().debug("Avg. for "+count+" calls (ms):"+((end-start)/count));
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

   public void testSpeed2()
      throws Exception
   {
      long start = System.currentTimeMillis();
      HelloHome home = (HelloHome)getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      int count = getIterationCount();
      for (int i = 0 ; i < count; i++)
      {
         hello.helloHello(hello);
      }
      long end = System.currentTimeMillis();
      getLog().debug("Avg. for "+count+" calls (ms):"+((end-start)/count));
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

    */
   public void testHello()
      throws Exception
   {
      HelloHome home = (HelloHome)getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      getLog().debug(hello.hello("testHello"));
      hello.remove();
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

    */
   public void testSleepingHello()
      throws Exception
   {
      HelloHome home = (HelloHome) getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      getLog().debug(hello.sleepingHello("testSleepingHello", 10000));
      hello.remove();
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

    */
   public void testHelloException()
      throws Exception
   {
      HelloHome home = (HelloHome)getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      try
      {
         getLog().debug("Invoking helloException");
         hello.helloException("testHelloException");
         fail("Was able to call helloException");
      }
      catch(HelloException e)
      {
         getLog().debug("Caught HelloException as expected");
      }
      hello.remove();
   }
View Full Code Here

Examples of org.jboss.test.hello.interfaces.Hello

    */
   public void testCNFEObject()
      throws Exception
   {
      HelloHome home = (HelloHome)getInitialContext().lookup(JNDI_NAME);
      Hello hello = home.create();
      try
      {
         // Remove
         File clazz = new File("classes/org/jboss/test/hello/ejb/HelloBean$ServerData.class");
         clazz.delete();
         getLog().debug("Invoking getCNFEObject");
         hello.getCNFEObject();
      }
      catch(Exception e)
      {
         getLog().debug("Caught ClassNotFoundException as expected", e);
      }
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.