camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Riedel (JIRA)" <>
Subject [jira] [Commented] (CAMEL-9153) ThreadPoolRejectedPolicy does not implement Abort as expected
Date Fri, 25 Sep 2015 21:09:04 GMT


Michael Riedel commented on CAMEL-9153:

I tried to align my patch to Camel's coding style. Not sure if I succeeded, because the `checkstyle-result.xml`
never contained any warnings after I ran the build (even with `-Psourcecheck`).

I'm a little confused regarding the unit test though. I couldn't find a test class for either
{{ThreadPoolRejectedPolicy}} or {{ThreadsProcessor}}. Also, it seems that there are a lot
more classes that make use of the {{RejectedExecutionHandlers}} provided by {{ThreadPoolRejectedPolicy}}.
For example, the Spring configuration snippet that I posted above ultimately seems to instantiate
a {{RejectableThreadPoolExecutor}}, for which I could not find a test class either. Wouldn't
it be necessary to write/adjust unit tests for all classes that potentially make use of {{ThreadPoolRejectedPolicy}}?

> ThreadPoolRejectedPolicy does not implement Abort as expected
> -------------------------------------------------------------
>                 Key: CAMEL-9153
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Michael Riedel
>            Priority: Minor
>             Fix For: 2.16.0
>         Attachments: ThreadPoolRejectedPolicy-Abort.patch, ThreadPoolRejectedPolicy-AbortNonRejectable.patch,
> Not sure if this is a bug or just a documentation flaw (in fact I could not find documentation
for it). Nevertheless, as a naive user, I kind of expected that the {{RejectedExecutionHandler}}
of {{ThreadPoolRejectedPolicy.Abort}} would have similar semantics as Java's {{ThreadPoolExecutor.AbortPolicy}}.
That is, I expected it to throw an {{Exception}}.
> Currently (that is in the 2.15.2 release, and on the master branch in git) that is not
the case. In fact, {{Abort}} seems to work exactly the same way as {{Discard}}.

This message was sent by Atlassian JIRA

View raw message