我使用jetty http2client,并开始失败:
QueuedThreadPool clientThreadPool = new QueuedThreadPool();
clientThreadPool.setName("http2Client");
clientThreadPool.setIdleTimeout(http2ClientIdletimeout);
clientThreadPool.setMaxThreads(http2ClientMaxThread);
clientThreadPool.setMinThreads(http2ClientMinThread);
http2Client.setExecutor(clientThreadPool);
http2Client.setInitialSessionRecvWindow(FlowControlStrategy.DEFAULT_WINDOW_SIZE);
http2Client.setInitialStreamRecvWindow(FlowControlStrategy.DEFAULT_WINDOW_SIZE);
sslContextFactory = sslContextHolder.buildJettySSLContextFactory();
http2Client.addBean(sslContextFactory);
例外:
java.util.concurrent.RejectedExecutionException: org.eclipse.jetty.io.ManagedSelector$$Lambda$7/352598575@436c81a3
at org.eclipse.jetty.util.thread.QueuedThreadPool.execute(QueuedThreadPool.java:385) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.io.SelectorManager.execute(SelectorManager.java:107) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.io.ManagedSelector.doStart(ManagedSelector.java:96) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.io.SelectorManager.doStart(SelectorManager.java:240) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.http2.client.HTTP2Client.doStart(HTTP2Client.java:166) ~[http2-client-9.4.6.v20170531.jar:9.4.6.v20170531]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-runner-9.4.6.v20170531.jar:9.4.6.v20170531]
有人有想法吗?提前致谢。