Package org.jboss.tutorial.asynch.bean

Examples of org.jboss.tutorial.asynch.bean.Echo


public class Client
{
   public static void main(String[] args) throws Exception
   {
      InitialContext ctx = new InitialContext();
      Echo echo = (Echo) ctx.lookup("EchoBean/remote");
      System.out.println("-------- Synchronous call");
      String ret = echo.echo("normal call");
      System.out.println(ret);

      // Create the asynchronous proxy
      Echo asynchEcho = AsyncUtils.mixinAsync(echo);
      System.out.println("-------- Asynchronous call");
      ret = asynchEcho.echo("asynchronous call");
      System.out.println("Direct return of async invocation is: " + ret);

      System.out.println("-------- Synchronous call");
      ret = echo.echo("normal call 2");
      System.out.println(ret);
View Full Code Here

TOP

Related Classes of org.jboss.tutorial.asynch.bean.Echo

Copyright © 2018 www.massapicom. 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.