spring-framework / org.springframework.jca.work / SimpleTaskWorkManager / <init>

<init>

SimpleTaskWorkManager()

Simple JCA 1.7 javax.resource.spi.work.WorkManager implementation that delegates to a Spring org.springframework.core.task.TaskExecutor. Provides simple task execution including start timeouts, but without support for a JCA ExecutionContext (i.e. without support for imported transactions).

Uses a org.springframework.core.task.SyncTaskExecutor for #doWork calls and a org.springframework.core.task.SimpleAsyncTaskExecutor for #startWork and #scheduleWork calls, by default. These default task executors can be overridden through configuration.

NOTE: This WorkManager does not provide thread pooling by default! Specify a org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor (or any other thread-pooling TaskExecutor) as "asyncTaskExecutor" in order to achieve actual thread pooling.

This WorkManager automatically detects a specified org.springframework.core.task.AsyncTaskExecutor implementation and uses its extended timeout functionality where appropriate. JCA WorkListeners are fully supported in any case.

Author
Juergen Hoeller

Since
2.0.3

See Also
#setSyncTaskExecutor#setAsyncTaskExecutor