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/16 15:35:51 UTC

svn commit: r997744 - /uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java

Author: cwiklik
Date: Thu Sep 16 13:35:50 2010
New Revision: 997744

URL: http://svn.apache.org/viewvc?rev=997744&view=rev
Log:
UIMA-1871 Modified sendReplyToRemoteClient() to release input CAS after sending Exception to a client

Modified:
    uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java

Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java?rev=997744&r1=997743&r2=997744&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java (original)
+++ uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java Thu Sep 16 13:35:50 2010
@@ -2021,15 +2021,16 @@ public class AggregateAnalysisEngineCont
     } else {
       // Send response to a given endpoint
       getOutputChannel().sendReply(cacheEntry, replyEndpoint);
-      // Drop the CAS only if the client is remote and the CAS is an input CAS OR
-      // the CAS is a child but there was a failure delivering it to a client. The client
-      // may have terminated while its input CAS was being processed, for example. 
-      // If this CAS has a parent the client will send Release CAS notification to release the CAS.
-      if (!casStateEntry.isSubordinate() || (casStateEntry.isSubordinate() && isCasMultiplier() && casStateEntry.deliveryToClientFailed() )) {
-    	  if ( cmOutstandingCASes.containsKey(casStateEntry.getCasReferenceId())) {
+    }
+    // Drop the CAS only if the client is remote and the CAS is an input CAS OR
+    // the CAS is a child but there was a failure delivering it to a client. The client
+    // may have terminated while its input CAS was being processed, for example. 
+    // If this CAS has a parent the client will send Release CAS notification to release the CAS.
+    if (!casStateEntry.isSubordinate() || (casStateEntry.isSubordinate() && isCasMultiplier() && casStateEntry.deliveryToClientFailed() )) {
+    	if ( cmOutstandingCASes.containsKey(casStateEntry.getCasReferenceId())) {
         	  cmOutstandingCASes.remove(casStateEntry.getCasReferenceId());
-    	  }
-    	  if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+    	}
+    	if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
            UIMAFramework.getLogger(CLASS_NAME).logrb(
                 Level.FINE,
                 CLASS_NAME.getName(),
@@ -2037,14 +2038,13 @@ public class AggregateAnalysisEngineCont
                 UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                 "UIMAEE_client_dead__FINE",
                 new Object[] { getComponentName(), replyEndpoint.getDestination().toString(), casStateEntry.getCasReferenceId()});
-          }
-    	  dropCAS(casStateEntry.getCasReferenceId(), true);
-    	  // If the cache is empty change the state of the Aggregate to idle
-    	  if (getInProcessCache().isEmpty()) {
-    		  endProcess(AsynchAEMessage.Process);
-    	  }
-      }
-    }
+        }
+    	dropCAS(casStateEntry.getCasReferenceId(), true);
+    	// If the cache is empty change the state of the Aggregate to idle
+    	if (getInProcessCache().isEmpty()) {
+    	  endProcess(AsynchAEMessage.Process);
+    	}
+     }
   }
 
   private void sendReplyToCollocatedClient(CacheEntry cacheEntry, CasStateEntry casStateEntry,