BasicThreadPool is eating the real exception
--------------------------------------------
Key: JBCOMMON-47
URL:
http://jira.jboss.com/jira/browse/JBCOMMON-47
Project: JBoss Common
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: common-core
Reporter: Adrian Brock
Fix For: 2.2.5.GA
When an execute() fails in the BasicThreadPool it is assuming this is because the
ThreadPool is full.
In fact, there could be many different reasons why the execute failed, e.g. the thread was
interrutped
21:08:53,080 WARN [BasicQueue] Caught unusual exception sending message to receiver.
org.jboss.util.threadpool.ThreadPoolFullException: java.lang.InterruptedException
at org.jboss.util.threadpool.BasicThreadPool.execute(BasicThreadPool.java:417)
at org.jboss.util.threadpool.BasicThreadPool.runTaskWrapper(BasicThreadPool.java:192)
at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:212)
at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:206)
The error handling needs improving:
protected void execute(TaskWrapper wrapper)
{
if( trace )
log.trace("execute, wrapper="+wrapper);
try
{
executor.execute(wrapper);
}
catch (Throwable t)
{
- wrapper.rejectTask(new ThreadPoolFullException(t.toString()));
+ wrapper.rejectTask(new ThreadPoolFullException(t));
}
}
Additionally, we should retry the on a Thread Interruption or mask the interruption
status
before executing the wrapper.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira