ejb客户端通过JNDI访问服务器报错 javax.naming.ServiceUnavailableException: Connection refused: connect
客户端代码为:
InitialContext ctx = new InitialContext();
FirstEjb ejb = (FirstEjb)ctx.lookup("FirstEjbBean/remote");
String s = ejb.saySomething("HelloWorld");
System.out.println(s);
具体错误为: