Index: src/main/java/com/sun/enterprise/v3/admin/cluster/GlassFishClusterExecutor.java =================================================================== --- src/main/java/com/sun/enterprise/v3/admin/cluster/GlassFishClusterExecutor.java (revision 42966) +++ src/main/java/com/sun/enterprise/v3/admin/cluster/GlassFishClusterExecutor.java (working copy) @@ -147,8 +147,8 @@ //only if the target is not "server" or "domain" if( (runtimeTypes.contains(RuntimeType.ALL)) || ((!CommandTarget.DAS.isValid(habitat, targetName)) && (!CommandTarget.DOMAIN.isValid(habitat, targetName))) ) { - //If the target is a cluster and dynamic reconfig enabled is false, no replication - if(targetService.isCluster(targetName)) { + //If the target is a cluster and dynamic reconfig enabled is false and RuntimeType is not ALL, no replication + if (targetService.isCluster(targetName) && !runtimeTypes.contains(RuntimeType.ALL)) { String dynRecfg = targetService.getClusterConfig(targetName).getDynamicReconfigurationEnabled(); if(Boolean.FALSE.equals(Boolean.valueOf(dynRecfg))) { ActionReport aReport = context.getActionReport().addSubActionsReport(); @@ -163,9 +163,38 @@ return ActionReport.ExitCode.WARNING; } } - List instancesForReplication = (runtimeTypes.contains(RuntimeType.ALL)) ? - targetService.getAllInstances() : - targetService.getInstances(targetName); + + List instancesForReplication = new ArrayList(); + + if (runtimeTypes.contains(RuntimeType.ALL)) { + List allInstances = targetService.getAllInstances(); + Set clusterNoReplication = new HashSet(); + for (Server s : allInstances) { + String dynRecfg = s.getConfig().getDynamicReconfigurationEnabled(); + if (Boolean.TRUE.equals(Boolean.valueOf(dynRecfg))) { + instancesForReplication.add(s); + } else { + clusterNoReplication.add(s.getCluster().getName()); + instanceState.setState(s.getName(), InstanceState.StateType.RESTART_REQUIRED, false); + instanceState.addFailedCommandToInstance(s.getName(), commandName, parameters); + } + } + + if (!clusterNoReplication.isEmpty()) { + ActionReport aReport = context.getActionReport().addSubActionsReport(); + aReport.setActionExitCode(ActionReport.ExitCode.WARNING); + aReport.setMessage(strings.getLocalString("glassfish.clusterexecutor.dynrecfgdisabled", + "WARNING: The command was not replicated to all cluster instances because the" + + " dynamic-reconfiguration-enabled flag is set to false for cluster(s) {0}", clusterNoReplication)); + } + + } else { + instancesForReplication = targetService.getInstances(targetName); + } + if(instancesForReplication.size() == 0) { ActionReport aReport = context.getActionReport().addSubActionsReport(); aReport.setActionExitCode(ActionReport.ExitCode.SUCCESS); Index: src/main/java/com/sun/enterprise/v3/admin/cluster/LocalStrings.properties =================================================================== --- src/main/java/com/sun/enterprise/v3/admin/cluster/LocalStrings.properties (revision 42966) +++ src/main/java/com/sun/enterprise/v3/admin/cluster/LocalStrings.properties (working copy) @@ -95,7 +95,7 @@ glassfish.clusterexecutor.notargets=Did not find any suitable instances for target {0}; command executed on DAS only glassfish.clusterexecutor.notargetspecified=A target was not specified in the command line; aborting further execution of CLI glassfish.clusterexecutor.supplementalcmdfailed=A supplemental command, {0}, failed -glassfish.clusterexecutor.dynrecfgdisabled=WARNING : The command was not replicated to all cluster instances because the dynamic-reconfig-enabled flag is set to false for cluster {0} +glassfish.clusterexecutor.dynrecfgdisabled=WARNING: The command was not replicated to all cluster instances because the dynamic-reconfiguration-enabled flag is set to false for cluster(s) {0} noNode=node is null noUpdate.nodeInUse=Cannot update node {0}. It is in use by a server instance \