/** * This method checks if this command has @ExecuteOn annotation with * RuntimeType.SINGle_INSTANCE * @param commandName the command which is executed * @return true only if @ExecuteOn has RuntimeType.SINGLE_INSTANCE false for * other cases */ public boolean isSingleInstanceCommand(String commandName) { CommandModel model = commandRunner.getModel(getScope(commandName),getCommandAfterScope(commandName),aalogger) ; if (model != null ) { ExecuteOn executeOn = model.getClusteringAttributes(); if ((executeOn != null) && (executeOn.value().length ==1) && executeOn.value()[0].equals(RuntimeType.SINGLE_INSTANCE)) { return true; } } return false; }
model = new CommandModelImpl(command.getClass()); org.glassfish.api.admin.ExecuteOn clAnnotation = model.getClusteringAttributes(); List<RuntimeType> runtimeTypes = new ArrayList<RuntimeType>(); if(clAnnotation == null) {
new CommandModelImpl(command.getClass()); org.glassfish.api.admin.ExecuteOn clAnnotation = model.getClusteringAttributes(); List<RuntimeType> runtimeTypes = new ArrayList<RuntimeType>(); @ExecuteOn final class DefaultExecuteOn {}
org.glassfish.api.admin.ExecuteOn clAnnotation = model.getClusteringAttributes(); if (clAnnotation == null) { runtimeTypes.add(RuntimeType.DAS); if (model.getClusteringAttributes() != null && model.getClusteringAttributes().executor() != null) { executor = habitat.getService(model.getClusteringAttributes().executor()); } else { executor = habitat.getService(ClusterExecutor.class, "GlassFishClusterExecutor");
org.glassfish.api.admin.ExecuteOn clAnnotation = model.getClusteringAttributes(); if (clAnnotation == null) { runtimeTypes.add(RuntimeType.DAS); if (model.getClusteringAttributes() != null && model.getClusteringAttributes().executor() != null) { executor = habitat.getService(model.getClusteringAttributes().executor()); } else { executor = habitat.getService(ClusterExecutor.class, "GlassFishClusterExecutor");