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 2009/06/24 21:06:08 UTC

svn commit: r788132 - /incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java

Author: cwiklik
Date: Wed Jun 24 19:06:08 2009
New Revision: 788132

URL: http://svn.apache.org/viewvc?rev=788132&view=rev
Log:
UIMA-1358

Modified:
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java?rev=788132&r1=788131&r2=788132&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/handler/input/ProcessResponseHandler.java Wed Jun 24 19:06:08 2009
@@ -28,6 +28,7 @@
 import org.apache.uima.aae.InProcessCache.CacheEntry;
 import org.apache.uima.aae.controller.AggregateAnalysisEngineController;
 import org.apache.uima.aae.controller.AnalysisEngineController;
+import org.apache.uima.aae.controller.BaseAnalysisEngineController;
 import org.apache.uima.aae.controller.Endpoint;
 import org.apache.uima.aae.controller.PrimitiveAnalysisEngineController;
 import org.apache.uima.aae.controller.LocalCache.CasStateEntry;
@@ -377,6 +378,7 @@
         casStateEntry.setReplyReceived();
         casStateEntry.setLastDelegate(delegate);
       }
+      delegate.removeCasFromOutstandingList(casReferenceId);
 
 			
 			if (cas != null)
@@ -489,7 +491,6 @@
 		boolean isCpCError = false;
 		String casReferenceId = null;
 
-
     try
 		{
       //  If a Process Request, increment number of docs processed
@@ -530,9 +531,12 @@
 
 			if ( object != null && (object instanceof Exception || object instanceof Throwable ))
 			{
-				
-				
-				Exception remoteException = new UimaAsDelegateException("----> Controller:"+getController().getComponentName()+" Received Exception From Delegate:"+delegateKey, (Exception) object);
+			  String casid_msg = (casReferenceId == null ) ? "" :" on CAS:"+casReferenceId;
+			  String controllerName = "/"+getController().getComponentName();
+			  if ( !getController().isTopLevelComponent()) {
+			    controllerName += ((BaseAnalysisEngineController)getController().getParentController()).getUimaContextAdmin().getQualifiedContextName();
+			  }
+				Exception remoteException = new UimaAsDelegateException("----> Controller:"+controllerName+" Received Exception "+casid_msg+" From Delegate:"+delegateKey, (Exception) object);
 				ErrorContext errorContext = new ErrorContext();
 				errorContext.add(AsynchAEMessage.Command, aMessageContext.getMessageIntProperty(AsynchAEMessage.Command));
 				errorContext.add(AsynchAEMessage.MessageType, aMessageContext.getMessageIntProperty(AsynchAEMessage.MessageType));