activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AMQ-3272) Handle RejectedExecutionException
Date Fri, 08 Apr 2011 10:52:05 GMT

     [ https://issues.apache.org/jira/browse/AMQ-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dejan Bosanac resolved AMQ-3272.
--------------------------------

    Resolution: Fixed

Should be fixed with svn revision 1090186.

The problem that exception occurred in the first place was the semaphore lock releasing at
the end of the task, leaving the small window when executor could accept new tasks while there's
no space available. With this fixed, the exception shouldn't happen even under high load.

> Handle RejectedExecutionException 
> ----------------------------------
>
>                 Key: AMQ-3272
>                 URL: https://issues.apache.org/jira/browse/AMQ-3272
>             Project: ActiveMQ
>          Issue Type: Improvement
>    Affects Versions: 5.5.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>             Fix For: 5.6.0
>
>
> Under heavy load, the async task executor in kahadb can throw RejectedExecutionException
meaning it can't accept more tasks.
> Thread pool executor has RejectedExecutionHandler that deals with these situations and
by default it aborts the task and throws the exception. I think it's much better to use ThreadPoolExecutor.CallerRunsPolicy
which will try to execute the task in the current thread and thus sync the execution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message