1 7 package org.jboss.tutorial.stateless_deployment_descriptor.client; 8 9 import org.jboss.tutorial.stateless_deployment_descriptor.bean.Calculator; 10 import org.jboss.tutorial.stateless_deployment_descriptor.bean.CalculatorRemote; 11 12 import javax.naming.InitialContext ; 13 14 public class Client 15 { 16 public static void main(String [] args) throws Exception 17 { 18 InitialContext ctx = new InitialContext (); 19 Calculator calculator = (Calculator) ctx.lookup(CalculatorRemote.class.getName()); 20 21 System.out.println("1 + 1 = " + calculator.add(1, 1)); 22 System.out.println("1 - 1 = " + calculator.subtract(1, 1)); 23 } 24 } 25 | Popular Tags |