}
}
public void forceTimeoutOnPendingCases(String key) {
Delegate delegate = ((AggregateAnalysisEngineController) this).lookupDelegate(key);
// Cancel the delegate timer. No more responses are expected
delegate.cancelDelegateTimer();
Endpoint endpoint = delegate.getEndpoint();
// If the delegate has CASes pending reply still, send each CAS
// from the pending list through the error handler with
// MessageTimeoutException as a cause of error
while (delegate.getCasPendingReplyListSize() > 0) {
String timedOutCasId = delegate.removeOldestCasFromOutstandingList();
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "handleAction",
UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_force_cas_timeout__INFO",
new Object[] { getComponentName(), key, timedOutCasId, " Pending Reply List" });
}
ErrorContext errorContext = new ErrorContext();
errorContext.add(AsynchAEMessage.Command, AsynchAEMessage.Process);
errorContext.add(AsynchAEMessage.CasReference, timedOutCasId);
errorContext.add(AsynchAEMessage.Endpoint, endpoint);
getErrorHandlerChain().handle(new ForcedMessageTimeoutException(), errorContext, this);
}
// If the delegate has CASes pending dispatch, send each CAS
// from the pending dispatch list through the error handler with
// MessageTimeoutException as a cause of error
while (delegate.getCasPendingDispatchListSize() > 0) {
String timedOutCasId = delegate.removeOldestFromPendingDispatchList();
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "handleAction",
UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_force_cas_timeout__INFO",
new Object[] { getComponentName(), key, timedOutCasId, " Pending Dispatch List" });