improved ThreadDeath handling
This commit is contained in:
parent
7a9b8f1e9d
commit
e3cf7a8898
|
@ -142,13 +142,14 @@ public class AsyncHttpConnection extends AbstractHttpConnection implements Async
|
|||
progress=true;
|
||||
}
|
||||
}
|
||||
catch (ThreadDeath e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
LOG.debug("Failure on " + _exchange, e);
|
||||
|
||||
if (e instanceof ThreadDeath)
|
||||
throw (ThreadDeath)e;
|
||||
|
||||
failed = true;
|
||||
|
||||
synchronized (this)
|
||||
|
|
|
@ -143,13 +143,14 @@ public class BlockingHttpConnection extends AbstractHttpConnection
|
|||
}
|
||||
|
||||
}
|
||||
catch (ThreadDeath e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
LOG.debug("Failure on " + _exchange, e);
|
||||
|
||||
if (e instanceof ThreadDeath)
|
||||
throw (ThreadDeath)e;
|
||||
|
||||
failed = true;
|
||||
|
||||
synchronized (this)
|
||||
|
|
|
@ -639,10 +639,12 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
{
|
||||
_connection.onInputShutdown();
|
||||
}
|
||||
catch (ThreadDeath e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
catch(Throwable x)
|
||||
{
|
||||
if (x instanceof ThreadDeath)
|
||||
throw (ThreadDeath)x;
|
||||
LOG.warn("onInputShutdown failed", x);
|
||||
try{close();}
|
||||
catch(IOException e2){LOG.ignore(e2);}
|
||||
|
|
|
@ -507,11 +507,12 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
{
|
||||
LOG.ignore(e);
|
||||
}
|
||||
catch (ThreadDeath e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
if (e instanceof ThreadDeath)
|
||||
throw (ThreadDeath)e;
|
||||
|
||||
if (isRunning())
|
||||
LOG.warn(e);
|
||||
else
|
||||
|
|
|
@ -472,11 +472,12 @@ public abstract class AbstractHttpConnection extends AbstractConnection
|
|||
_request.setHandled(true);
|
||||
_response.sendError(e.getStatus(), e.getReason());
|
||||
}
|
||||
catch (ThreadDeath e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
if (e instanceof ThreadDeath)
|
||||
throw (ThreadDeath)e;
|
||||
|
||||
LOG.warn(String.valueOf(_uri),e);
|
||||
error=true;
|
||||
_request.setHandled(true);
|
||||
|
|
|
@ -309,12 +309,13 @@ public class HashSessionManager extends AbstractSessionManager
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (ThreadDeath e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
if (t instanceof ThreadDeath)
|
||||
throw ((ThreadDeath)t);
|
||||
else
|
||||
__log.warn("Problem scavenging sessions", t);
|
||||
__log.warn("Problem scavenging sessions", t);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -805,12 +805,13 @@ public class JDBCSessionManager extends AbstractSessionManager
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (ThreadDeath e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
if (t instanceof ThreadDeath)
|
||||
throw ((ThreadDeath)t);
|
||||
else
|
||||
LOG.warn("Problem expiring sessions", t);
|
||||
LOG.warn("Problem expiring sessions", t);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue