JavaBean that allows for configuring a JSR-166 backport {@link edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor} in beanstyle (through its "corePoolSize", "maxPoolSize", "keepAliveSeconds", "queueCapacity" properties), exposing it as a Spring {@link org.springframework.core.task.TaskExecutor}. This is an alternative to configuring a ThreadPoolExecutor instance directly using constructor injection, with a separate {@link ConcurrentTaskExecutor} adapter wrapping it.
For any custom needs, in particular for defining a {@link edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor}, it is recommended to use a straight definition of the Executor instance or a factory method definition that points to the JSR-166 backport {@link edu.emory.mathcs.backport.java.util.concurrent.Executors} class.To expose such a raw Executor as a Spring {@link org.springframework.core.task.TaskExecutor}, simply wrap it with a {@link ConcurrentTaskExecutor} adapter.
NOTE: This class implements Spring's {@link org.springframework.core.task.TaskExecutor} interface (and hence implicitlythe standard Java 5 {@link java.util.concurrent.Executor} interface) as well asthe JSR-166 {@link edu.emory.mathcs.backport.java.util.concurrent.Executor}interface, with the former being the primary interface, the other just serving as secondary convenience. For this reason, the exception handling follows the TaskExecutor contract rather than the backport Executor contract, in particular regarding the {@link org.springframework.core.task.TaskRejectedException}.
@author Juergen Hoeller
@since 2.0.3
@see org.springframework.core.task.TaskExecutor
@see edu.emory.mathcs.backport.java.util.concurrent.Executor
@see edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
@see edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor
@see edu.emory.mathcs.backport.java.util.concurrent.Executors
@see ConcurrentTaskExecutor
@deprecated as of Spring 3.2, in favor of using the native JDK 6 concurrent support