open class DefaultManagedTaskExecutor : ConcurrentTaskExecutor, InitializingBean
JNDI-based variant of ConcurrentTaskExecutor, performing a default lookup for JSR-236's "java:comp/DefaultManagedExecutorService" in a Java EE 7 environment.
Note: This class is not strictly JSR-236 based; it can work with any regular java.util.concurrent.Executor that can be found in JNDI. The actual adapting to javax.enterprise.concurrent.ManagedExecutorService happens in the base class ConcurrentTaskExecutor itself.
Author
Juergen Hoeller
Since
4.0
DefaultManagedTaskExecutor()
JNDI-based variant of ConcurrentTaskExecutor, performing a default lookup for JSR-236's "java:comp/DefaultManagedExecutorService" in a Java EE 7 environment. Note: This class is not strictly JSR-236 based; it can work with any regular java.util.concurrent.Executor that can be found in JNDI. The actual adapting to javax.enterprise.concurrent.ManagedExecutorService happens in the base class ConcurrentTaskExecutor itself. |
open fun afterPropertiesSet(): Unit |
|
open fun setJndiEnvironment(jndiEnvironment: Properties): Unit
Set the JNDI environment to use for JNDI lookups. |
|
open fun setJndiName(jndiName: String): Unit
Specify a JNDI name of the java.util.concurrent.Executor to delegate to, replacing the default JNDI name "java:comp/DefaultManagedExecutorService". This can either be a fully qualified JNDI name, or the JNDI name relative to the current environment naming context if "resourceRef" is set to "true". |
|
open fun setJndiTemplate(jndiTemplate: JndiTemplate): Unit
Set the JNDI template to use for JNDI lookups. |
|
open fun setResourceRef(resourceRef: Boolean): Unit
Set whether the lookup occurs in a Java EE container, i.e. if the prefix "java:comp/env/" needs to be added if the JNDI name doesn't already contain it. PersistenceAnnotationBeanPostProcessor's default is "true". |
open fun execute(task: Runnable): Unitopen fun execute(task: Runnable, startTimeout: Long): Unit |
|
fun getConcurrentExecutor(): Executor
Return the java.util.concurrent.Executor that this adapter delegates to. |
|
open fun prefersShortLivedTasks(): Boolean
This task executor prefers short-lived work units. |
|
fun setConcurrentExecutor(executor: Executor): Unit
Specify the java.util.concurrent.Executor to delegate to. Autodetects a JSR-236 javax.enterprise.concurrent.ManagedExecutorService in order to expose javax.enterprise.concurrent.ManagedTask adapters for it. |
|
fun setTaskDecorator(taskDecorator: TaskDecorator): Unit
Specify a custom TaskDecorator to be applied to any Runnable about to be executed. Note that such a decorator is not necessarily being applied to the user-supplied The primary use case is to set some execution context around the task's invocation, or to provide some monitoring/statistics for task execution. |
|
open fun submit(task: Runnable): Future<*>open fun <T : Any> submit(task: Callable<T>): Future<T> |
|
open fun submitListenable(task: Runnable): ListenableFuture<*>open fun <T : Any> submitListenable(task: Callable<T>): ListenableFuture<T> |