What is the purpose of TaskExecutor in spring. What problem does it solve ? How is it different from Executors in java concurrent package ?
23.4. The Spring TaskExecutor abstraction
<strong>Spring's TaskExecutor interface is identical to the java.util.concurrent.Executor interface. In fact, its primary reason for existence is to abstract away the need for Java 5 when using thread pools.</strong> The interface has a single method execute(Runnable task) that accepts a task for execution based on the semantics and configuration of the thread pool.
It's an interface whose implementations wrap around Java 5+
ExecutorService and provide implementations for previous versions of Java that are missing the package