java Wildfly 8.2远程处理打开的通道太多
下面是我的远程处理配置,当我进行远程处理时,一切都正常。问题是,在某一点上,打开的通道太多,因此其他远程处理调用会因此问题而失败
为了解决这个问题,我试图在最后一个声明中关闭上下文,并解决这个问题:
INFO [org.jboss.ejb.client.remoting]
(Remoting "config-based-ejb-client-endpoint" task-9)
EJBCLIENT000016:
Channel Channel ID c50b300b (outbound) of Remoting connection
29298b25 host/127.0.0.1:8080 can no longer process messages
...failed with exception -:
java.lang.IllegalStateException:
EJBCLIENT000027: No EJBReceiver available for node name
String info = "remote.connection.default";
props.put(info + ".host", StringUtils.substringBefore(url, ":"));
props.put(info + ".port", StringUtils.substringAfter(url, ":"));
props.put(info + ".username", "username");
props.put(info + ".password", "password");
props.put(info + ".connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "true");
props.put(info + ".connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
props.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
props.put("org.jboss.ejb.client.scoped.context", "true");
InitialContext ctx = new InitialContext(props);
我如何解决这个问题?我是不是错过了一处房产?如何关闭ejb上下文而不出现此问题
谢谢!
# 1 楼答案
在静态地图的帮助下,我可以在以后关闭上下文
# 2 楼答案
有一种静态方法