casCachedRequest = (ClientRequest) clientCache.get(casReferenceId);
}
try {
if ( casCachedRequest != null ) {
// entering user provided callback. Handle exceptions.
UimaASProcessStatus status = new UimaASProcessStatusImpl(new ProcessTrace_impl(),casCachedRequest.getCAS(),
casReferenceId);
String nodeIP = message.getStringProperty(AsynchAEMessage.ServerIP);
String pid = message.getStringProperty(AsynchAEMessage.UimaASProcessPID);
if ( casReferenceId != null && nodeIP != null && pid != null) {
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(
Level.FINE,
CLASS_NAME.getName(),
"handleServiceInfo",
JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAJMS_calling_onBeforeProcessCAS_FINE",
new Object[] {
casReferenceId,
String.valueOf(casCachedRequest.getCAS().hashCode())
});
}
onBeforeProcessCAS(status,nodeIP, pid);
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(
Level.FINE,
CLASS_NAME.getName(),
"handleServiceInfo",
JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAJMS_completed_onBeforeProcessCAS_FINE",
new Object[] {
casReferenceId,
String.valueOf(casCachedRequest.getCAS().hashCode())
});
}
}
casCachedRequest.setHostIpProcessingCAS(message.getStringProperty(AsynchAEMessage.ServerIP));
if (message.getJMSReplyTo() != null && serviceDelegate.isCasPendingReply(casReferenceId)) {
casCachedRequest.setFreeCasNotificationQueue(message.getJMSReplyTo());
}
} else {
ClientRequest requestToCache = (ClientRequest) clientCache.get(uniqueIdentifier);
if ( requestToCache != null && requestToCache.isMetaRequest()) {
String nodeIP = message.getStringProperty(AsynchAEMessage.ServerIP);
String pid = message.getStringProperty(AsynchAEMessage.UimaASProcessPID);
if ( pid != null && nodeIP != null ) {
UimaASProcessStatus status = new UimaASProcessStatusImpl(new ProcessTrace_impl(),null,
casReferenceId);
// notify client that the last request (GetMeta ) has been received by a service.
onBeforeProcessMeta(nodeIP, pid);
}