jetty-9 ensure injected threadpool is managed
This commit is contained in:
parent
8366ae08c9
commit
962a0d0889
|
@ -46,6 +46,7 @@ public class LikeJettyXml
|
|||
threadPool.setMaxThreads(500);
|
||||
|
||||
Server server = new Server(threadPool);
|
||||
server.manage(threadPool);
|
||||
server.setDumpAfterStart(true);
|
||||
server.setDumpBeforeStop(true);
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ public class StressTest
|
|||
_threads.setMaxThreads(200);
|
||||
|
||||
_server = new Server(_threads);
|
||||
_server.manage(_threads);
|
||||
_connector = new SelectChannelConnector(_server,null,null,null,null,1,1);
|
||||
_connector.setAcceptQueueSize(5000);
|
||||
_connector.setIdleTimeout(30000);
|
||||
|
|
|
@ -68,6 +68,17 @@ public class AggregateLifeCycle extends AbstractLifeCycle implements Destroyable
|
|||
{
|
||||
for (Bean b:_beans)
|
||||
{
|
||||
if (b._bean instanceof LifeCycle)
|
||||
{
|
||||
LifeCycle l=(LifeCycle)b._bean;
|
||||
if (!l.isRunning())
|
||||
{
|
||||
if (b._managed)
|
||||
l.start();
|
||||
else
|
||||
LOG.warn("!managed !started {}",b);
|
||||
}
|
||||
}
|
||||
if (b._managed && b._bean instanceof LifeCycle)
|
||||
{
|
||||
LifeCycle l=(LifeCycle)b._bean;
|
||||
|
|
|
@ -161,6 +161,7 @@ public class WebSocketLoadRFC6455Test
|
|||
QueuedThreadPool threadPool = new QueuedThreadPool(200);
|
||||
threadPool.setMaxStopTimeMs(1000);
|
||||
_server = new Server(threadPool);
|
||||
_server.manage(threadPool);
|
||||
|
||||
_connector = new SelectChannelConnector(_server);
|
||||
_server.addConnector(_connector);
|
||||
|
|
|
@ -62,6 +62,7 @@ public class TestServer
|
|||
|
||||
// Setup server
|
||||
Server server = new Server(threadPool);
|
||||
server.manage(threadPool);
|
||||
server.setSendDateHeader(true);
|
||||
|
||||
// Setup JMX
|
||||
|
|
Loading…
Reference in New Issue