wildfly jndi(java.net.connectException:连接拒绝:无进一步的信息)]
我在野生蝇10上使用jndi。 查找时,我有一个错误: “ java.net.connectException:连接拒绝:没有更多信息”
我的jboss-ejb-client.properties在类路径中未读取事件。 因此,我将数据放在初始信息中。
private static Context createInitialContext() throws NamingException {
Properties jndiProperties = new Properties();
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
// jndiProperties.put(Context.PROVIDER_URL, "remote://localhost:8089");
jndiProperties.put(Context.PROVIDER_URL, "remote://localhost:4447");
jndiProperties.put("jboss.naming.client.ejb.context", true);
jndiProperties.put("endpoint.name","client-endpoint");
jndiProperties.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED","false");
jndiProperties.put("remote.connections","default");
jndiProperties.put("remote.connection.default.host","localhost");
jndiProperties.put("remote.connection.default.port","4447");
jndiProperties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS","false");
jndiProperties.put("remote.connection.default.username","***");
jndiProperties.put("remote.connection.default.password","***");
return new InitialContext(jndiProperties);
}
- 远程似乎是唯一可用的协议。 2))其他地方是否需要任何配置?
TX寻求帮助。
I am using jndi on wildfly 10.
when doing the lookup, i've got an error :
"java.net.ConnectException: Connection refused: no further information"
my jboss-ejb-client.properties is not read event in the classpath.
So I put the data in the InitialContext.
private static Context createInitialContext() throws NamingException {
Properties jndiProperties = new Properties();
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
// jndiProperties.put(Context.PROVIDER_URL, "remote://localhost:8089");
jndiProperties.put(Context.PROVIDER_URL, "remote://localhost:4447");
jndiProperties.put("jboss.naming.client.ejb.context", true);
jndiProperties.put("endpoint.name","client-endpoint");
jndiProperties.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED","false");
jndiProperties.put("remote.connections","default");
jndiProperties.put("remote.connection.default.host","localhost");
jndiProperties.put("remote.connection.default.port","4447");
jndiProperties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS","false");
jndiProperties.put("remote.connection.default.username","***");
jndiProperties.put("remote.connection.default.password","***");
return new InitialContext(jndiProperties);
}
- remote seems to be the only protocol available.
2)) Is there any configuration needed somewhere else?
tx for ur help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论