You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bu...@apache.org on 2017/07/10 20:57:49 UTC

svn commit: r1801534 - /uima/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java

Author: burn
Date: Mon Jul 10 20:57:49 2017
New Revision: 1801534

URL: http://svn.apache.org/viewvc?rev=1801534&view=rev
Log:
UIMA-5486 When registering a service the endpoint is extracted from the DD if not explicitly specified

Modified:
    uima/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java

Modified: uima/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java?rev=1801534&r1=1801533&r2=1801534&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java (original)
+++ uima/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java Mon Jul 10 20:57:49 2017
@@ -402,14 +402,18 @@ public class DuccServiceApi
                 endpoint = inferred_endpoint;
             } else {
                 // Check & strip any broker URL decorations on the endpoint
+                // by (ab)using the method that syntax checks dependencies
                 endpoint = DuccUiUtilities.check_service_dependencies(null, endpoint);
-                cli_props.setProperty(UiOption.ServiceRequestEndpoint.pname(), endpoint);    // SM uses both endpoint definitions !!!
                 if ( !inferred_endpoint.equals(endpoint) ) {
                     throw new IllegalArgumentException("Specified endpoint does not match endpoint extracted from UIMA DD"
                                                      + "\n --service_request_endpoint: " + endpoint
                                                      + "\n                  extracted: " + inferred_endpoint );
                 }
             }
+            // UIMA-5486 Set this to the inferred-from-DD value when omitted from the spec
+            // or replace with the possibly stripped value.
+            // Note: SM puts this in the smreg table and also in the smmeta table as "endpoint"
+            cli_props.setProperty(UiOption.ServiceRequestEndpoint.pname(), endpoint);
             
             // Set default classpath if not specified - only used for UIMA-AS services
             String key_cp = UiOption.Classpath.pname();