CAS cas = null;
if ( aMessageContext.propertyExists(AsynchAEMessage.CasSequence) )
{
isNewCAS = true;
Endpoint casMultiplierEndpoint = aMessageContext.getEndpoint();
if ( casMultiplierEndpoint == null )
{
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
"handleProcessRequestWithCASReference", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_no_endpoint_for_reply__INFO",
new Object[] { casReferenceId });
return;
}
//
if ( getController() instanceof AggregateAnalysisEngineController )
{
getController().getInProcessCache().setCasProducer(casReferenceId, casMultiplierEndpoint.getEndpoint());
newCASProducedBy =
((AggregateAnalysisEngineController)getController()).lookUpDelegateKey(casMultiplierEndpoint.getEndpoint());
casMultiplierEndpoint.setIsCasMultiplier(true);
((AggregateAnalysisEngineController)getController()).
getServicePerformance(newCASProducedBy).
incrementNumberOfCASesProcessed();
CacheEntry subordinateCasCacheEntry = getController().getInProcessCache().getCacheEntryForCAS(casReferenceId);
subordinateCasCacheEntry.setReplyReceived();
CacheEntry inputCasCacheEntry = getController().
getInProcessCache().
getCacheEntryForCAS(subordinateCasCacheEntry.getInputCasReferenceId());
if ( inputCasCacheEntry != null )
{
synchronized( inputCasCacheEntry )
{
// System.out.println("++++++++ Incrementing Delegate:"+casReferenceId+" Count For Input Cas::"+subordinateCasCacheEntry.getInputCasReferenceId());
inputCasCacheEntry.incrementSubordinateCasInPlayCount();
}
}
}
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
"handleProcessRequestWithCASReference", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_new_cas__FINE",
new Object[] { casReferenceId, newCASProducedBy });
// MessageContext contains endpoint set by the CAS Multiplier service. Overwrite
// this with the endpoint of the client who sent the input CAS. In case this
// aggregate is configured to send new CASes to the client we know where to send them.
// if ( aMessageContext.getEndpoint() != null )
// {
// aMessageContext.getEndpoint().setEndpoint(casMultiplierEndpoint.getEndpoint());
// aMessageContext.getEndpoint().setServerURI(casMultiplierEndpoint.getServerURI());
// }
aMessageContext.getEndpoint().setEndpoint(casMultiplierEndpoint.getEndpoint());
aMessageContext.getEndpoint().setServerURI(casMultiplierEndpoint.getServerURI());
inputCasReferenceId = aMessageContext.getMessageStringProperty(AsynchAEMessage.InputCasReference);
}
else
{