org.jboss.soa.esb.services.jbpm.integration.msg
Class RetryExecutor

java.lang.Object
  extended by org.jboss.soa.esb.services.jbpm.integration.msg.RetryExecutor
All Implemented Interfaces:
java.lang.Runnable

public class RetryExecutor
extends java.lang.Object
implements java.lang.Runnable

Executor responsible for checking for retry invocations. The DB service does this implicitly but we need to explicitly check for this during JMS.

Author:
Kevin Conner

Field Summary
static java.lang.String RETRY_EXECUTOR
          The lock name associated with the executor.
 
Constructor Summary
RetryExecutor(int idleInterval, int maxIdleInterval, int maxRetryJobs)
          Create the retry executor thread.
 
Method Summary
static void handleSuspendedJob(Job job)
          Process a suspended job.
static void handleSuspendedTimer(Timer timer)
          Process a suspended timer.
 void run()
          Look for newly active suspended/retry jobs.
 void terminate()
          Request a termination of the loop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RETRY_EXECUTOR

public static final java.lang.String RETRY_EXECUTOR
The lock name associated with the executor.

See Also:
Constant Field Values
Constructor Detail

RetryExecutor

public RetryExecutor(int idleInterval,
                     int maxIdleInterval,
                     int maxRetryJobs)
Create the retry executor thread.

Parameters:
idleInterval - The idle interval.
maxIdleInterval - The max idle interval.
maxRetryJobs - The max number of retry jobs.
Method Detail

run

public void run()
Look for newly active suspended/retry jobs.

Specified by:
run in interface java.lang.Runnable

terminate

public void terminate()
Request a termination of the loop.


handleSuspendedJob

public static void handleSuspendedJob(Job job)
Process a suspended job.

Parameters:
job - The suspended job.

handleSuspendedTimer

public static void handleSuspendedTimer(Timer timer)
Process a suspended timer.

Parameters:
timer - The suspended timer.