Example usage for org.springframework.core.task SimpleAsyncTaskExecutor setThreadGroup

List of usage examples for org.springframework.core.task SimpleAsyncTaskExecutor setThreadGroup

Introduction

In this page you can find the example usage for org.springframework.core.task SimpleAsyncTaskExecutor setThreadGroup.

Prototype

public void setThreadGroup(@Nullable ThreadGroup threadGroup) 

Source Link

Document

Specify the thread group that threads should be created in.

Usage

From source file:org.eclipse.gemini.blueprint.extender.internal.support.ExtenderConfiguration.java

private TaskExecutor createDefaultTaskExecutor() {
    // create thread-pool for starting contexts
    ThreadGroup threadGroup = new ThreadGroup(
            "eclipse-gemini-blueprint-extender[" + ObjectUtils.getIdentityHexString(this) + "]-threads");
    threadGroup.setDaemon(false);//from   w w  w. j  a  v a  2s  .com

    SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor();
    taskExecutor.setThreadGroup(threadGroup);
    taskExecutor.setThreadNamePrefix("EclipseGeminiBlueprintExtenderThread-");

    isTaskExecutorManagedInternally = true;

    return taskExecutor;
}

From source file:org.springframework.osgi.extender.internal.support.ExtenderConfiguration.java

private TaskExecutor createDefaultTaskExecutor() {
    // create thread-pool for starting contexts
    ThreadGroup threadGroup = new ThreadGroup(
            "spring-osgi-extender[" + ObjectUtils.getIdentityHexString(this) + "]-threads");
    threadGroup.setDaemon(false);// ww  w  .j  a  v  a  2  s. c om

    SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor();
    taskExecutor.setThreadGroup(threadGroup);
    taskExecutor.setThreadNamePrefix("SpringOsgiExtenderThread-");

    isTaskExecutorManagedInternally = true;

    return taskExecutor;
}