package jCuckoo.client;
import jCuckoo.HelloWorld;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class EJBClient {
/**
* @param args
*/
public static void main(String[] args) {
try {
InitialContext ctx=new InitialContext();
HelloWorld helloworld=(HelloWorld)ctx.lookup("HelloWorldBean/remote");
System.out.println(helloworld.sayHello("小麦"));
} catch (NamingException e) {
System.out.println(e.getMessage());
}
}
}
评论6