Class CommonJWorkManagerExecutorService
java.lang.Object
org.camunda.bpm.container.impl.threading.ra.commonj.CommonJWorkManagerExecutorService
- All Implemented Interfaces:
ExecutorService
AbstractPlatformJobExecutor implementation delegating to a CommonJ WorkManager.- Author:
- Christian Lipphardt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected JcaExecutorServiceConnectorprotected commonj.work.WorkManager -
Constructor Summary
ConstructorsConstructorDescriptionCommonJWorkManagerExecutorService(JcaExecutorServiceConnector ra, String commonJWorkManagerName) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanexecuteShortRunning(Runnable runnable) getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine) Returns a runnable to be used for executing Jobs.commonj.work.WorkManagerprotected commonj.work.WorkManagerbooleanPasses aRunnableto the runtime container for execution.protected booleanscheduleLongRunning(Runnable acquisitionRunnable)
-
Field Details
-
workManager
protected commonj.work.WorkManager workManager -
ra
-
commonJWorkManagerName
-
-
Constructor Details
-
CommonJWorkManagerExecutorService
public CommonJWorkManagerExecutorService(JcaExecutorServiceConnector ra, String commonJWorkManagerName)
-
-
Method Details
-
lookupWorkMananger
protected commonj.work.WorkManager lookupWorkMananger() -
schedule
Description copied from interface:ExecutorServicePasses a
Runnableto 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:
schedulein interfaceExecutorService- Parameters:
runnable- theRunnableto be executed.isLongRunning- indicates whether the runnable is a daemon.- Returns:
- true if the runnable could be successfully scheduled for execution. 'false' otherwise.
-
executeShortRunning
-
scheduleLongRunning
-
getExecuteJobsRunnable
Description copied from interface:ExecutorServiceReturns a runnable to be used for executing Jobs.
- Specified by:
getExecuteJobsRunnablein interfaceExecutorService- Returns:
-
getWorkManager
public commonj.work.WorkManager getWorkManager()
-