[英]Wildfly 8.2 Remoting - Too many channels open
以下是我用于远程处理的配置,并且在进行远程处理时一切正常。 问题是在某个时刻,打开的通道太多,因此,其他远程调用因此问题而失败。
为了解决此问题,我尝试在finally语句中关闭上下文并得到此问题:
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上下文?
谢谢
借助静态地图,我能够在以后关闭Context。
有一个静态方法
EJBClientContext.getCurrent().close();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.