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/30 16:07:02 UTC
svn commit: r789740 -
/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
Author: cwiklik
Date: Tue Jun 30 14:07:01 2009
New Revision: 789740
URL: http://svn.apache.org/viewvc?rev=789740&view=rev
Log:
UIMA-1391 Modify to handle stop requests from the client
Modified:
incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java?rev=789740&r1=789739&r2=789740&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java Tue Jun 30 14:07:01 2009
@@ -1714,6 +1714,9 @@
}
return false;
}
+ private boolean casHasExceptions(CasStateEntry casStateEntry) {
+ return (casStateEntry.getErrors().size() > 0) ? true : false;
+ }
private void sendReplyWithException( CacheEntry acacheEntry, CasStateEntry casStateEntry, Endpoint replyEndpoint) throws Exception {
//boolean casProducedInThisAggregate = getComponentName().equals(cacheEntry.getCasProducerAggregateName());
if ( casStateEntry.isSubordinate()) {
@@ -1780,8 +1783,7 @@
CasStateEntry topAncestorCasStateEntry = getLocalCache().
getTopCasAncestor(casStateEntry.getInputCasReferenceId());
// check the state
- if ( topAncestorCasStateEntry.isFailed() && topAncestorCasStateEntry.getSubordinateCasInPlayCount() == 0) {
-
+ if ( topAncestorCasStateEntry.isFailed() && casHasExceptions(casStateEntry) && topAncestorCasStateEntry.getSubordinateCasInPlayCount() == 0) {
return true;
} else {
// Add the id of the generated CAS to the map holding outstanding CASes. This
@@ -1790,7 +1792,7 @@
// quick lookup
cmOutstandingCASes.put(casStateEntry.getCasReferenceId(),casStateEntry.getCasReferenceId());
}
- } else if ( casStateEntry.isFailed()) {
+ } else if ( casStateEntry.isFailed() && casHasExceptions(casStateEntry)) {
return true;
}
return false;
@@ -1817,8 +1819,6 @@
private void sendReplyToCollocatedClient( CacheEntry cacheEntry, CasStateEntry casStateEntry, Endpoint replyEndpoint) throws Exception {
boolean casProducedInThisAggregate = getComponentName().equals(cacheEntry.getCasProducerAggregateName());
- String componentName = getComponentName();
-
boolean isSubordinate = casStateEntry.isSubordinate();
boolean serviceIsCM = isCasMultiplier();
if ( sendExceptionToClient(cacheEntry, casStateEntry, replyEndpoint) ) {
@@ -1982,6 +1982,7 @@
}
catch( Exception e)
{
+ e.printStackTrace();
// Any error here is automatic termination
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "executeFlowStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING", new Object[] { e });
try