Wildfly 10:EJB Remote远程调用从Wildfly 9迁移到10时停止工作

时间:2016-11-11 05:21:28

标签: java ejb wildfly wildfly-10

以下代码段在调用Wildfly 9服务器实例时没有问题,但是当它调用wildfly 10服务器时,却无法说:

  

警告:无法注册EJB接收器以连接到192.168.1.47:8080   java.lang.RuntimeException:操作失败,状态为WAITING       在org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:94)

public static void main(String[] args) throws NamingException {
    Properties props;

    props = new Properties();

    props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
    props.put("org.jboss.ejb.client.scoped.context", true);
    props.put("endpoint.name","client-endpoint");

    props.put("endpoint.remote.connectionprovider.create.options"
                    + ".org.xnio.Options.SSL_ENABLED", false);

    props.put("remote.connections", "default");
    props.put("remote.connection.default.host", "192.168.1.47");
    props.put("remote.connection.default.port", "8080");

    props.put("remote.connection.default.connect.options"
                  + ".org.xnio.Options.SASL_POLICY_NOANONYMOUS", false);

    props.put("remote.connection.default.username", "carlos");
    props.put("remote.connection.default.password", "1234");

    Context context = (Context) new InitialContext(props).lookup("ejb:"); //failing line!!!
}

服务器之间没有区别:两者都使用给定的密码定义用户carlos,两台服务器在同一台机器上运行,具有相同的IP地址和端口(当然不是在同一时间!)。 .. 它们之间的唯一区别是Wildfly服务器版本!

应用程序客户端根据目标wildfly使用jboss-client.jar ...

0 个答案:

没有答案
相关问题