You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2011/05/12 12:36:47 UTC

[jira] [Updated] (AMQ-3272) Handle RejectedExecutionException

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

Gary Tully updated AMQ-3272:
----------------------------

        Labels: kahaDB queue  (was: )
    Issue Type: Bug  (was: Improvement)

aborting the task is really a bug as a semaphore is engaged to gate the task queue.

> Handle RejectedExecutionException 
> ----------------------------------
>
>                 Key: AMQ-3272
>                 URL: https://issues.apache.org/jira/browse/AMQ-3272
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Dejan Bosanac
>            Assignee: Gary Tully
>              Labels: kahaDB, queue
>             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