Class JcaWorkManagerExecutorService

java.lang.Object
org.camunda.bpm.container.impl.threading.ra.JcaWorkManagerExecutorService
All Implemented Interfaces:
Referenceable, javax.resource.Referenceable, ExecutorService

public class JcaWorkManagerExecutorService extends Object implements javax.resource.Referenceable, ExecutorService
AbstractPlatformJobExecutor implementation delegating to a JCA WorkManager.
Author:
Daniel Meyer
  • Field Details

    • START_WORK_TIMEOUT

      public static int START_WORK_TIMEOUT
    • ra

      protected final JcaExecutorServiceConnector ra
    • workManager

      protected javax.resource.spi.work.WorkManager workManager
    • reference

      protected Reference reference
  • Constructor Details

    • JcaWorkManagerExecutorService

      public JcaWorkManagerExecutorService(JcaExecutorServiceConnector connector, javax.resource.spi.work.WorkManager workManager)
  • Method Details

    • schedule

      public boolean schedule(Runnable runnable, boolean isLongRunning)
      Description copied from interface: ExecutorService

      Passes a Runnable to the runtime container for execution. Some runtime containers (like a Java EE container offer container provided infrastructure for executing background work (such as a JCA WorkManager). This method allows the process engine to take advantage of container infrastructure for doing background work.

      Specified by:
      schedule in interface ExecutorService
      Parameters:
      runnable - the Runnable to be executed.
      isLongRunning - indicates whether the runnable is a daemon.
      Returns:
      true if the runnable could be successfully scheduled for execution. 'false' otherwise.
    • scheduleLongRunning

      protected boolean scheduleLongRunning(Runnable runnable)
    • executeShortRunning

      protected boolean executeShortRunning(Runnable runnable)
    • getExecuteJobsRunnable

      public Runnable getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine)
      Description copied from interface: ExecutorService

      Returns a runnable to be used for executing Jobs.

      Specified by:
      getExecuteJobsRunnable in interface ExecutorService
      Returns:
    • getReference

      public Reference getReference() throws NamingException
      Specified by:
      getReference in interface Referenceable
      Throws:
      NamingException
    • setReference

      public void setReference(Reference reference)
      Specified by:
      setReference in interface javax.resource.Referenceable
    • getWorkManager

      public javax.resource.spi.work.WorkManager getWorkManager()
    • getPlatformJobExecutorConnector

      public JcaExecutorServiceConnector getPlatformJobExecutorConnector()