Description
Seems like there is no way to close a programmatically created EJBClientContext when the application no longer needs it. When you leave it open and create new ones, eventually you end up with
org.jboss.remoting3.ProtocolException: Too many channels open at org.jboss.remoting3.remote.RemoteConnectionHandler.handleOutboundChannelOpen(RemoteConnectionHandler.java:193) at org.jboss.remoting3.remote.RemoteConnectionHandler.open(RemoteConnectionHandler.java:334) at org.jboss.remoting3.ConnectionImpl.openChannel(ConnectionImpl.java:113) at org.jboss.remoting3.ManagedConnection.openChannel(ManagedConnection.java:73) at org.jboss.remoting3.ClientServiceHandle.getClientService(ClientServiceHandle.java:84) at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$1.handleDone(RemotingEJBDiscoveryProvider.java:94) at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$1.handleDone(RemotingEJBDiscoveryProvider.java:83) at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:208) at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:723) at org.xnio.IoUtils$2.execute(IoUtils.java:71) at org.xnio.AbstractIoFuture.runNotifier(AbstractIoFuture.java:696) at org.xnio.AbstractIoFuture$CompleteState.withNotifier(AbstractIoFuture.java:132) at org.xnio.AbstractIoFuture.addNotifier(AbstractIoFuture.java:570) at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.discover(RemotingEJBDiscoveryProvider.java:83) at org.wildfly.discovery.ConfiguredProvider.discover(ConfiguredProvider.java:45) at org.wildfly.discovery.Discovery.discover(Discovery.java:94) at org.jboss.ejb.client.EJBClientContext.discover(EJBClientContext.java:253) at org.jboss.ejb.client.EJBClientContext.discoverAffinityNone(EJBClientContext.java:401) ... 126 more