org.jboss.remoting3.ProtocolException:打开的通道太多。如何增加频道

时间:2016-04-27 12:12:02

标签: jboss ejb jboss-eap-6

我有ejb客户端连接jboss 6.4 eap服务器。我每次拨打ejb电话时都会关闭ejb上下文。一切正常,但是当我收到大量请求时,#org.jboss.remoting3.ProtocolException:打开太多频道"

            Properties properties = new Properties();
            properties.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
            properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
            properties.put("remote.connections", "1");
            properties.put("remote.connection.1.host","IP");
            properties.put("remote.connection.1.port","4447");
            properties.put("org.jboss.ejb.client.scoped.context", "true");
            properties.put("remote.connection.1.username", "EJB_USER"));
            properties.put("remote.connection.1.password", "EJB_PASSWORD");


            context = new InitialContext(properties);
            ejbContext = (Context) context.lookup("ejb:");
            final Object obj = ejbContext.lookup("EAR/BEAN/BEANName!RemoteInterface");

            try{
                //do something
            }finally{
                ejbContext.close();
            }
  

15:41:21,621错误[org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver](Remoting"基于配置的-ejb-client-endpoint" task-10)无法为上下文打开频道EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@591adafe,receiver =远程连接EJB接收器[connection = org.jboss.ejb.client.remoting.ConnectionPool $ PooledConnection @ 30a6a839,channel = jboss.ejb,nodename = jbeap -int]}:org.jboss.remoting3.ProtocolException:打开的通道太多       在org.jboss.remoting3.remote.RemoteConnectionHandler.handleOutboundChannelOpen(RemoteConnectionHandler.java:185)       在org.jboss.remoting3.remote.RemoteConnectionHandler.open(RemoteConnectionHandler.java:326)       在org.jboss.remoting3.ConnectionImpl.openChannel(ConnectionImpl.java:82)       在org.jboss.ejb.client.remoting.ConnectionPool $ PooledConnection.openChannel(ConnectionPool.java:229)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat- 1]       在org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.associate(RemotingConnectionEJBReceiver.java:130)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1]       在org.jboss.ejb.client.EJBClientContext.registerEJBReceiver(EJBClientContext.java:383)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1]       在org.jboss.ejb.client.EJBClientContext.registerEJBReceiver(EJBClientContext.java:335)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1]       在org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:150)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1]       在org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:115)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1]       在org.jboss.ejb.client.naming.ejb.EjbNamingContext.createIdentifiableEjbClientContext(EjbNamingContext.java:258)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat- 1]       在org.jboss.ejb.client.naming.ejb.EjbNamingContext.setupScopedEjbClientContextIfNeeded(EjbNamingContext.java:123)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat- 1]       在org.jboss.ejb.client.naming.ejb.EjbNamingContext。(EjbNamingContext.java:98)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat-1 ]       在org.jboss.ejb.client.naming.ejb.ejbURLContextFactory.getObjectInstance(ejbURLContextFactory.java:38)[jboss-ejb-client-1.0.30.Final-redhat-1.jar:1.0.30.Final-redhat- 1]       at org.jboss.as.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:141)       在javax.naming.InitialContext.lookup(InitialContext.java:417)[rt.jar:1.8.0_45]       在javax.naming.InitialContext.lookup(InitialContext.java:417)[rt.jar:1.8.0_45]

如何增加此频道?(我怎么知道同时限制为40频道)

谢谢。

1 个答案:

答案 0 :(得分:1)

无法增加频道数量。我已将我的上下文实例设为静态。