GlassFishWorkManagerTaskExecutor (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.jca.work.glassfish

## Class GlassFishWorkManagerTaskExecutor

- java.lang.Object
- - org.springframework.jndi.JndiAccessor
  - - org.springframework.jndi.JndiLocatorSupport
    - - org.springframework.jca.work.WorkManagerTaskExecutor
      - - org.springframework.jca.work.glassfish.GlassFishWorkManagerTaskExecutor

- All Implemented Interfaces:
    Executor, WorkManager, Aware, InitializingBean, AsyncTaskExecutor, TaskExecutor, BootstrapContextAware, SchedulingTaskExecutor

      public class GlassFishWorkManagerTaskExecutor
      extends WorkManagerTaskExecutor

  Spring TaskExecutor adapter for the GlassFish JCA WorkManager. Can be defined in web applications to make a TaskExecutor reference available, talking to the GlassFish WorkManager (thread pool) underneath.

  This is the GlassFish equivalent of the CommonJ `WorkManagerTaskExecutor` adapter for WebLogic and WebSphere.

  Since:
    2.5.2
  Author:
    Juergen Hoeller

- - ### Field Summary

    - ### Fields inherited from class org.springframework.jndi.JndiLocatorSupport

      `CONTAINER_PREFIX`

    - ### Fields inherited from class org.springframework.jndi.JndiAccessor

      `logger`

    - ### Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor

      `TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE`

    - ### Fields inherited from interface javax.resource.spi.work.WorkManager

      `IMMEDIATE, INDEFINITE, UNKNOWN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GlassFishWorkManagerTaskExecutor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected WorkManager` | `getDefaultWorkManager()` Obtains GlassFish's default thread pool.
    `void` | `setThreadPoolName(String threadPoolName)` Identify a specific GlassFish thread pool to talk to.

    - ### Methods inherited from class org.springframework.jca.work.WorkManagerTaskExecutor

      `afterPropertiesSet, doWork, doWork, execute, execute, prefersShortLivedTasks, scheduleWork, scheduleWork, setBlockUntilCompleted, setBlockUntilStarted, setBootstrapContext, setWorkListener, setWorkManager, setWorkManagerName, startWork, startWork, submit, submit`

    - ### Methods inherited from class org.springframework.jndi.JndiLocatorSupport

      `convertJndiName, isResourceRef, lookup, lookup, setResourceRef`

    - ### Methods inherited from class org.springframework.jndi.JndiAccessor

      `getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GlassFishWorkManagerTaskExecutor

          public GlassFishWorkManagerTaskExecutor()

  - ### Method Detail

    - #### setThreadPoolName

          public void setThreadPoolName(String threadPoolName)

      Identify a specific GlassFish thread pool to talk to.

      The thread pool name matches the resource adapter name in default RAR deployment scenarios.

    - #### getDefaultWorkManager

          protected WorkManager getDefaultWorkManager()

      Obtains GlassFish's default thread pool.
      Overrides:
        `getDefaultWorkManager` in class `WorkManagerTaskExecutor`