You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by to...@apache.org on 2012/06/06 21:53:35 UTC
svn commit: r1347080 - in
/uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment:
AEDeploymentConstants.java AEDeploymentMetaData.java ProcessCasErrors.java
impl/AEDeploymentMetaData_Impl.java
Author: tongfin
Date: Wed Jun 6 19:53:35 2012
New Revision: 1347080
URL: http://svn.apache.org/viewvc?rev=1347080&view=rev
Log:
UIMA-1245 -Processing order of parent CAS different on UIMA and UIMA AS
In the Deployment Descriptor Editor:
- Expose "processParentLast" (default: false)
- Enable editing of "CAS Continue On Failure"
Modified:
uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java
uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentMetaData.java
uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/ProcessCasErrors.java
uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/AEDeploymentMetaData_Impl.java
Modified: uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java?rev=1347080&r1=1347079&r2=1347080&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java (original)
+++ uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentConstants.java Wed Jun 6 19:53:35 2012
@@ -128,6 +128,8 @@ public interface AEDeploymentConstants
final static public String TAG_ATTR_NUMBER_OF_CASES = "numberOfCASes";
final static public String TAG_ATTR_INIT_SIZE_OF_CAS_HEAP = "initialFsHeapSize";
+ final static public String TAG_ATTR_PROCESS_PARENT_CAS_LAST = "processParentLast";
+
final static public String TAG_ATTR_KEY = "key";
final static public String TAG_ATTR_ASYNC = "async";
final static public String TAG_ATTR_NUMBER_OF_INSTANCES = "numberOfInstances";
Modified: uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentMetaData.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentMetaData.java?rev=1347080&r1=1347079&r2=1347080&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentMetaData.java (original)
+++ uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/AEDeploymentMetaData.java Wed Jun 6 19:53:35 2012
@@ -112,6 +112,10 @@ public interface AEDeploymentMetaData
*/
public void setCasMultiplierPoolSize(int poolSize);
+ public boolean getProcessParentCASLast();
+
+ public void setProcessParentCASLast(boolean value);
+
/**
* @return the parent of this AEDeploymentMetaData
*/
Modified: uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/ProcessCasErrors.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/ProcessCasErrors.java?rev=1347080&r1=1347079&r2=1347080&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/ProcessCasErrors.java (original)
+++ uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/ProcessCasErrors.java Wed Jun 6 19:53:35 2012
@@ -35,9 +35,9 @@ public interface ProcessCasErrors
final static String NAME_DELEGATE_THRESHOLD_COUNT = "Delegate Threshold Count";
final static String NAME_DELEGATE_THRESHOLD_WINDOW = "Delegate Threshold Window";
final static String NAME_DELEGATE_THRESHOLD_ACTION = "Delegate Threshold Action";
- final static String NAME_MAX_RETRIES = "CAS Max Retries";
- final static String NAME_TIMEOUT = "CAS Timeout (in millisec)";
- final static String NAME_CONTINUE_ON_RETRY = "CAS Continue On Failure";
+ final static String NAME_MAX_RETRIES = "CAS Max Retries";
+ final static String NAME_TIMEOUT = "CAS Timeout (in millisec)";
+ final static String NAME_CONTINUE_ON_FAILURE = "CAS Continue On Failure";
public ProcessCasErrors clone(AsyncAEErrorConfiguration parent);
Modified: uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/AEDeploymentMetaData_Impl.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/AEDeploymentMetaData_Impl.java?rev=1347080&r1=1347079&r2=1347080&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/AEDeploymentMetaData_Impl.java (original)
+++ uima/uima-as/trunk/uimaj-ep-runtime-deployeditor/src/main/java/org/apache/uima/aae/deployment/impl/AEDeploymentMetaData_Impl.java Wed Jun 6 19:53:35 2012
@@ -99,6 +99,8 @@ AEDeploymentConstants, AEDeploymentMetaD
protected int initialFsHeapSize = DEFAULT_CAS_INITIAL_HEAP_SIZE;
+ protected boolean processParentCASLast = false;
+
protected AEDelegates_Impl delegates;
protected AsyncAEErrorConfiguration asyncAEErrorConfiguration;
@@ -414,6 +416,20 @@ AEDeploymentConstants, AEDeploymentMetaD
}
}
+ // Check for Optional "processParentLast =[false|true]"
+ val = DDParserUtil.checkAndGetAttributeValue(TAG_CAS_MULTIPLIER, TAG_ATTR_PROCESS_PARENT_CAS_LAST, elem, false);
+ boolean b = false;
+ if (val != null && val.trim().length() > 0) {
+ try {
+ b = Boolean.parseBoolean(val);
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ throw new InvalidXMLException(InvalidXMLException.UNKNOWN_ELEMENT,
+ new Object[] { TAG_ATTR_PROCESS_PARENT_CAS_LAST }, e);
+ }
+ }
+ setProcessParentCASLast(b);
+
} else if (AEDeploymentConstants.TAG_DELEGATES.equalsIgnoreCase(elem.getTagName())) {
delegates = new AEDelegates_Impl(this);
NodeList nodes = elem.getChildNodes();
@@ -499,9 +515,9 @@ AEDeploymentConstants, AEDeploymentMetaD
if ( (value=asyncAEErrorConfiguration.getProcessCasErrors().getMaxRetries()) != 0) {
throw new InvalidXMLException(InvalidXMLException.INVALID_ELEMENT_TEXT,
new Object[]{value, TAG_ATTR_MAX_RETRIES});
- } else if ( (b=asyncAEErrorConfiguration.getProcessCasErrors().isContinueOnRetryFailure()) ) {
- throw new InvalidXMLException(InvalidXMLException.INVALID_ELEMENT_TEXT,
- new Object[]{b, TAG_ATTR_CONTINUE_ON_RETRY_FAILURE});
+// } else if ( (b=asyncAEErrorConfiguration.getProcessCasErrors().isContinueOnRetryFailure()) ) {
+// throw new InvalidXMLException(InvalidXMLException.INVALID_ELEMENT_TEXT,
+// new Object[]{b, TAG_ATTR_CONTINUE_ON_RETRY_FAILURE});
}
}
@@ -566,7 +582,7 @@ AEDeploymentConstants, AEDeploymentMetaD
attrs.clear();
}
- // <casMultiplier poolSize="5" initialFsHeapSize="200000" /> <!-- req | omit-->
+ // <casMultiplier poolSize="5" processParentLast="false"initialFsHeapSize="200000" /> <!-- req | omit-->
// Only for AS primitive CAS Multiplier
if (!isAsync() && AEDeploymentDescription_Impl.isCASMultiplier(getResourceSpecifier())) {
if (getCasMultiplierPoolSize() != UNDEFINED_INT) {
@@ -575,6 +591,9 @@ AEDeploymentConstants, AEDeploymentMetaD
attrs.addAttribute("", TAG_ATTR_INIT_SIZE_OF_CAS_HEAP, TAG_ATTR_INIT_SIZE_OF_CAS_HEAP,
null, ""+initialFsHeapSize);
+ attrs.addAttribute("", TAG_ATTR_PROCESS_PARENT_CAS_LAST, TAG_ATTR_PROCESS_PARENT_CAS_LAST,
+ null, ""+getProcessParentCASLast());
+
aContentHandler.startElement("", AEDeploymentConstants.TAG_CAS_MULTIPLIER,
AEDeploymentConstants.TAG_CAS_MULTIPLIER, attrs);
aContentHandler.endElement("", "", AEDeploymentConstants.TAG_CAS_MULTIPLIER);
@@ -691,6 +710,14 @@ AEDeploymentConstants, AEDeploymentMetaD
}
}
+ public boolean getProcessParentCASLast() {
+ return processParentCASLast;
+ }
+
+ public void setProcessParentCASLast(boolean value) {
+ this.processParentCASLast = value;
+ }
+
/**
* @return the async
*/