Top Description Fields Constructors Methods
org.springframework.scheduling.concurrent

public Class DefaultManagedTaskExecutor

extends ConcurrentTaskExecutor
implements InitializingBean
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.InitializingBean
Imports
java.util.Properties, java.util.concurrent.Executor, javax.naming.NamingException, org.springframework.beans.factory.InitializingBean, org.springframework.jndi.JndiLocatorDelegate, .JndiTemplate

References Deprecated

ConcurrentTaskExecutor is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

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 java.util.concurrent.Executor that can be found in JNDI. The actual adapting to jakarta.enterprise.concurrent.ManagedExecutorService happens in the base class ConcurrentTaskExecutor itself.

Author
Juergen Hoeller
Since
4.0
See Also
jakarta.enterprise.concurrent.ManagedExecutorService

Field Summary

Modifier and TypeField and Description
private final JndiLocatorDelegate
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
afterPropertiesSet()

Implements org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

public void
setJndiEnvironment(Properties jndiEnvironment)

Set the JNDI environment to use for JNDI lookups.

public void
setJndiName(String jndiName)

Specify a JNDI name of the java.util.concurrent.Executor to delegate to, replacing the default JNDI name "java:comp/DefaultManagedExecutorService".

public void
setJndiTemplate(JndiTemplate jndiTemplate)

Set the JNDI template to use for JNDI lookups.

public 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.

Inherited from org.springframework.scheduling.concurrent.ConcurrentTaskExecutor:
executeexecutegetConcurrentExecutorsetConcurrentExecutorsetTaskDecoratorsubmitsubmitsubmitListenablesubmitListenable

Field Detail

jndiLocatorback to summary
private final JndiLocatorDelegate jndiLocator
jndiNameback to summary
private String jndiName

Constructor Detail

DefaultManagedTaskExecutorback to summary
public DefaultManagedTaskExecutor()

Method Detail

afterPropertiesSetback to summary
public void afterPropertiesSet() throws NamingException

Implements org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Doc from org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

Annotations
@Override
setJndiEnvironmentback to summary
public void setJndiEnvironment(Properties jndiEnvironment)

Set the JNDI environment to use for JNDI lookups.

See Also
org.springframework.jndi.JndiAccessor#setJndiEnvironment
setJndiNameback to summary
public void setJndiName(String jndiName)

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".

See Also
setConcurrentExecutor, setResourceRef
setJndiTemplateback to summary
public void setJndiTemplate(JndiTemplate jndiTemplate)

Set the JNDI template to use for JNDI lookups.

See Also
org.springframework.jndi.JndiAccessor#setJndiTemplate
setResourceRefback to summary
public 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".

See Also
org.springframework.jndi.JndiLocatorSupport#setResourceRef