我刚开始学习EJB,只是想执行我的第一个代码。 然而,我无法消除这种误差:Wildfly 8.0上的EJB服务器错误
Error-11:24:22,065 INFO [org.jboss.as.naming] (default task-3) JBAS011806: Channel end notification received, closing channel Channel ID 4fb1d052 (inbound) of Remoting connection 6e42fa05 to null
我使用Java 1.8与wildfly 8.0
代码ClientBean
public static void main(String[] args) throws CommunicationException {
try {
Context context = getInitialContext();
Hello remote=(Hello)context.lookup("HelloBean/remote");
System.out.println(remote.Hello());
}
catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static Context getInitialContext() throws javax.naming.NamingException {
Properties properties=new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
properties.put(Context.PROVIDER_URL,"http-remoting://localhost:8080");
properties.put("jboss.naming.client.ejb.context", true);
return new javax.naming.InitialContext(properties);
}