Class DefaultManagedTaskExecutor
java.lang.Object
org.springframework.scheduling.concurrent.ConcurrentTaskExecutor
org.springframework.scheduling.concurrent.DefaultManagedTaskExecutor
- All Implemented Interfaces:
- Executor,- InitializingBean,- AsyncListenableTaskExecutor,- AsyncTaskExecutor,- TaskExecutor,- SchedulingTaskExecutor
JNDI-based variant of 
ConcurrentTaskExecutor, performing a default lookup for
 JSR-236's "java:comp/DefaultManagedExecutorService" in a Jakarta EE/8 environment.
 Note: This class is not strictly JSR-236 based; it can work with any regular
 Executor that can be found in JNDI.
 The actual adapting to ManagedExecutorService
 happens in the base class ConcurrentTaskExecutor itself.
- Since:
- 4.0
- Author:
- Juergen Hoeller
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.scheduling.concurrent.ConcurrentTaskExecutorConcurrentTaskExecutor.ManagedTaskBuilder
- 
Field SummaryFields inherited from interface org.springframework.core.task.AsyncTaskExecutorTIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.voidsetJndiEnvironment(Properties jndiEnvironment) Set the JNDI environment to use for JNDI lookups.voidsetJndiName(String jndiName) Specify a JNDI name of theExecutorto delegate to, replacing the default JNDI name "java:comp/DefaultManagedExecutorService".voidsetJndiTemplate(JndiTemplate jndiTemplate) Set the JNDI template to use for JNDI lookups.voidsetResourceRef(boolean resourceRef) Set whether the lookup occurs in a Jakarta EE container, i.e.Methods inherited from class org.springframework.scheduling.concurrent.ConcurrentTaskExecutorexecute, execute, getConcurrentExecutor, setConcurrentExecutor, setTaskDecorator, submit, submit, submitListenable, submitListenableMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.scheduling.SchedulingTaskExecutorprefersShortLivedTasks
- 
Constructor Details- 
DefaultManagedTaskExecutorpublic DefaultManagedTaskExecutor()
 
- 
- 
Method Details- 
setJndiTemplateSet the JNDI template to use for JNDI lookups.
- 
setJndiEnvironmentSet the JNDI environment to use for JNDI lookups.
- 
setResourceRefpublic void setResourceRef(boolean resourceRef) Set whether the lookup occurs in a Jakarta 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".
- 
setJndiNameSpecify a JNDI name of theExecutorto 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". 
- 
afterPropertiesSetDescription copied from interface:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. - Specified by:
- afterPropertiesSetin interface- InitializingBean
- Throws:
- NamingException
 
 
-