Issue #3440 Stop on Unavailable

+ revert schedulers to non-daemon threads for now so this PR can
   proceed.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2019-03-12 09:21:19 +11:00
parent a9707471a0
commit 76a37352f5
7 changed files with 7 additions and 7 deletions

View File

@ -98,7 +98,7 @@ public class LikeJettyXml
Server server = new Server(threadPool);
// Scheduler
server.addBean(new ScheduledExecutorScheduler(null,true));
server.addBean(new ScheduledExecutorScheduler(null,false));
// HTTP Configuration
HttpConfiguration http_config = new HttpConfiguration();

View File

@ -171,7 +171,7 @@ public class ConnectHandler extends HandlerWrapper
{
scheduler = getServer().getBean(Scheduler.class);
if (scheduler == null)
scheduler = new ScheduledExecutorScheduler(String.format("Proxy-Scheduler-%x", hashCode()), true);
scheduler = new ScheduledExecutorScheduler(String.format("Proxy-Scheduler-%x", hashCode()), false);
addBean(scheduler);
}

View File

@ -183,7 +183,7 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
_executor=executor!=null?executor:_server.getThreadPool();
if (scheduler==null)
scheduler=_server.getBean(Scheduler.class);
_scheduler=scheduler!=null?scheduler:new ScheduledExecutorScheduler(String.format("Connector-Scheduler-%x",hashCode()),true);
_scheduler=scheduler!=null?scheduler:new ScheduledExecutorScheduler(String.format("Connector-Scheduler-%x",hashCode()),false);
if (pool==null)
pool=_server.getBean(ByteBufferPool.class);
_byteBufferPool = pool!=null?pool:new ArrayByteBufferPool();

View File

@ -121,7 +121,7 @@ public class HouseKeeper extends AbstractLifeCycle
if (_scheduler == null)
{
_scheduler = new ScheduledExecutorScheduler(String.format("Session-HouseKeeper-%x",hashCode()),true);
_scheduler = new ScheduledExecutorScheduler(String.format("Session-HouseKeeper-%x",hashCode()),false);
_ownScheduler = true;
_scheduler.start();
if (LOG.isDebugEnabled()) LOG.debug("Using own scheduler for scavenging");

View File

@ -523,7 +523,7 @@ public class SessionHandler extends ScopedHandler
_scheduler = server.getBean(Scheduler.class);
if (_scheduler == null)
{
_scheduler = new ScheduledExecutorScheduler(String.format("Session-Scheduler-%x",hashCode()), true);
_scheduler = new ScheduledExecutorScheduler(String.format("Session-Scheduler-%x",hashCode()), false);
_ownScheduler = true;
_scheduler.start();
}

View File

@ -281,7 +281,7 @@ public class DoSFilter implements Filter
{
try
{
Scheduler result = new ScheduledExecutorScheduler(String.format("DoS-Scheduler-%x",hashCode()),true);
Scheduler result = new ScheduledExecutorScheduler(String.format("DoS-Scheduler-%x",hashCode()),false);
result.start();
return result;
}

View File

@ -87,7 +87,7 @@ public class WebSocketServerFactory extends ContainerLifeCycle implements WebSoc
private final ClassLoader contextClassloader;
private final Map<Integer, WebSocketHandshake> handshakes = new HashMap<>();
// TODO: obtain shared (per server scheduler, somehow)
private final Scheduler scheduler = new ScheduledExecutorScheduler(String.format("WebSocket-Scheduler-%x",hashCode()),true);
private final Scheduler scheduler = new ScheduledExecutorScheduler(String.format("WebSocket-Scheduler-%x",hashCode()),false);
private final List<WebSocketSessionListener> listeners = new ArrayList<>();
private final String supportedVersions;
private final WebSocketPolicy defaultPolicy;