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/07/13 16:44:36 UTC

svn commit: r793595 - /incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java

Author: cwiklik
Date: Mon Jul 13 14:44:35 2009
New Revision: 793595

URL: http://svn.apache.org/viewvc?rev=793595&view=rev
Log:
UIMA-1434 Modified to prevent logging exceptions on stale messages

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

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java?rev=793595&r1=793594&r2=793595&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/error/handler/ProcessCasErrorHandler.java Mon Jul 13 14:44:35 2009
@@ -203,11 +203,6 @@
 			return false;
 		}
 		
-    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(), "handleError", 
-				UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", t);
-    }
-		
 		String casReferenceId = null;
 		if ( anErrorContext.containsKey(AsynchAEMessage.CasReference)) 
 		{
@@ -231,9 +226,7 @@
 		//	Determine if the exception occured while sending a reply to the client
 		boolean isEndpointTheClient = 
 			isClient( (Endpoint) anErrorContext.get(AsynchAEMessage.Endpoint), aController, casReferenceId);
-		
-		
-		
+
 		if ( ignoreError( t, anErrorContext, isEndpointTheClient ))
 		{
       if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
@@ -268,6 +261,12 @@
     		return true;   // handled here. This message will not processed
 		}
 
+		//  Log the exception
+		if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(), "handleError", 
+        UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", t);
+    }
+    
 		String key = ""; 
 		Threshold threshold = null;
 		boolean delegateDisabled = false;