You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2010/09/09 15:32:17 UTC
svn commit: r995420 -
/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
Author: cwiklik
Date: Thu Sep 9 13:32:17 2010
New Revision: 995420
URL: http://svn.apache.org/viewvc?rev=995420&view=rev
Log:
UIMA-1867 modified process() to detect send failures and to force CAS release
Modified:
uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java?rev=995420&r1=995419&r2=995420&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java (original)
+++ uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java Thu Sep 9 13:32:17 2010
@@ -629,9 +629,16 @@ public class PrimitiveAnalysisEngineCont
// Send generated CAS to the client
if (!stopped) {
getOutputChannel().sendReply(newEntry, anEndpoint);
+ // Check for delivery failure. The client may have terminated while an input CAS was being processed
+ if ( childCasStateEntry.deliveryToClientFailed() ) {
+ if ( cmOutstandingCASes.containsKey(childCasStateEntry.getCasReferenceId())) {
+ cmOutstandingCASes.remove(childCasStateEntry.getCasReferenceId());
+ }
+ dropCAS(childCasStateEntry.getCasReferenceId(), true);
+ }
}
}
- // Remove the new CAS state entry from the local cache if this a top level primitive.
+ // Remove new CAS state entry from the local cache if this is a top level primitive.
// If not top level, the client (an Aggregate) will remove this entry when this new
// generated CAS reaches Final State.
if (isTopLevelComponent()) {