[jboss-jira] [JBoss JIRA] Closed: (JBCOMMON-47) BasicThreadPool is eating the real exception

Adrian Brock (JIRA) jira-events at lists.jboss.org
Mon Mar 31 14:38:40 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBCOMMON-47?page=all ]

Adrian Brock closed JBCOMMON-47.
--------------------------------

    Resolution: Done
      Assignee: Adrian Brock

I fixed the exception handling. 

The interrupted problem is no longer issue with the latest common-core using java.util.concurrent.

It is an issue with the older common release (that used oswego concurrent)
and currently in jboss-4.2.2

> 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
>         Assigned To: 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

        



More information about the jboss-jira mailing list