Tag Archives: Executor

Handling Task Rejections – Java’s Executor/Spring’s TaskExecutor


Are you seeing exceptions like TaskRejectedException(Spring Framework) or RejectedExecutionException(Java), and you want my few cents on how to handle it, go ahead plz. The easiest  way, though not the best way, is to use ThreadPoolExecutor.CallerRunsPolicy as a RejectionExecutionHandler for thread pool scenarios with BOUNDED queue. By default, the Executor uses the Abort Policy, which just […]