Author: challngr Date: Fri Apr 11 12:42:20 2014 New Revision: 1586634 URL: http://svn.apache.org/r1586634 Log: UIMA-3726 Correctly build Modify array in cli.
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java?rev=1586634&r1=1586633&r2=1586634&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/DuccServiceApi.java Fri Apr 11 12:42:20 2014 @@ -153,17 +153,20 @@ public class DuccServiceApi // generate modify options, same as registration options, only with the verb // Modify insteady of Register, and on extra option, Activate. - modify_options = new UiOption[registration_options.length + 1]; + // The length here: same as registration options, + // plus 1 for Activate, + // minus 1 for ProcessDD + // minus 1 for ServiceRequestEndpoint + modify_options = new UiOption[registration_options.length - 1]; int i = 0; - for ( ; i < registration_options.length; i++ ) { - UiOption o = registration_options[i]; + for ( UiOption o : registration_options ) { if ( o == UiOption.ProcessDD ) continue; // disallowed for modify if ( o == UiOption.ServiceRequestEndpoint) continue; // disallowed for modify if ( o == UiOption.Register ) o = UiOption.Modify; - modify_options[i] = o; + modify_options[i++] = o; } modify_options[i++] = UiOption.Activate; } Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java?rev=1586634&r1=1586633&r2=1586634&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java Fri Apr 11 12:42:20 2014 @@ -908,12 +908,10 @@ public class ServiceHandler case SchedulingClass: case Environment: case ProcessMemorySize: - case ProcessDD: case ProcessExecutable: case ProcessExecutableArgs: case ClasspathOrder: case ServiceDependency: - case ServiceRequestEndpoint: case ProcessInitializationTimeMax: case WorkingDirectory: sset.setJobProperty(option.pname(), value); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java?rev=1586634&r1=1586633&r2=1586634&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java Fri Apr 11 12:42:20 2014 @@ -118,7 +118,8 @@ public class ServiceManagerComponent // Local SM version // 1.1.0 - reworked SM // 1.1.3 - added shutdown hook, pinger last-use, pinger disable autostart - String version = "1.1.3"; + // 1.1.4 - dynamic mod of all registration parms. Add debug and max-init-time parms. + String version = "1.1.4"; public ServiceManagerComponent(CamelContext context) {