public class ExecutorServiceBean extends Object implements ExecutorService
ExecutorService
as Stateless Bean.Modifier and Type | Field and Description |
---|---|
protected JcaExecutorServiceConnection |
executorConnection |
protected JcaExecutorServiceConnectionFactory |
executorConnectionFactory |
Constructor and Description |
---|
ExecutorServiceBean() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeConnection() |
Runnable |
getExecuteJobsRunnable(List<String> jobIds,
ProcessEngineImpl processEngine)
Returns a runnable to be used for executing Jobs.
|
protected void |
openConnection() |
boolean |
schedule(Runnable runnable,
boolean isLongRunning)
Passes a
Runnable to the runtime container for execution. |
protected JcaExecutorServiceConnectionFactory executorConnectionFactory
protected JcaExecutorServiceConnection executorConnection
@PostConstruct protected void openConnection()
@PreDestroy protected void closeConnection()
public boolean schedule(Runnable runnable, boolean isLongRunning)
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.
schedule
in interface ExecutorService
runnable
- the Runnable
to be executed.isLongRunning
- indicates whether the runnable is a daemon.public Runnable getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine)
ExecutorService
Returns a runnable to be used for executing Jobs.
getExecuteJobsRunnable
in interface ExecutorService
Copyright © 2022. All rights reserved.