IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Handling the processor timeout event

About this task

The application can handle the processor timeout. The class ProcessorExpirationCheckManager uses the JDK scheduler to check expiration. It does not depend on traditional BTT event.
The following are the APIs provided by ProcessorExpirationCheckManager:
public static void addCSProcessorInactivityListener(CSProcessorInactivityListener  listener )
public static void startExpirationCheckTask( long  timeBetweenChecksValue)
public static synchronized void stopThread()

When the application handles the processor timeout, it needs to implement CSProcessorInactivityListener, and add the listener to ProcessorExpirationCheckManager and set the interval to check timeout. When the application is stopped, BTT StartServerSerlvet calls the stopThread() method to dispose the thread to avoid that the thread is out of the control of the WebContianer.

Following is the usage sample:
// start the task and add listener
ProcessorExpirationCheckManager.addCSProcessorInactivityListener(aCSProcessorInactivityListener);
ProcessorExpirationCheckManager.startExpirationCheckTask( timeBetweenCheck );
 	 

// stop the task in servlet destroy() method
ProcessorExpirationCheckManager.stopThread();


Feedback