Examples of discardActiveBatch()


Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        }

        final Batch batch = batchManager.getActiveBatch();
        List<BatchedCommand> currentBatch = batch.getCommands();
        if(currentBatch.isEmpty()) {
            batchManager.discardActiveBatch();
            throw new CommandFormatException("The batch is empty.");
        }

        final ModelNode composite = batch.toRequest();
        ModelNode result;
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

            result = ctx.getModelControllerClient().execute(composite);
        } catch (Exception e) {
            throw new CommandFormatException("Failed to execute batch: " + e.getLocalizedMessage());
        }
        if(Util.isSuccess(result)) {
            batchManager.discardActiveBatch();
            ctx.printLine("The batch executed successfully.");
        } else {
            throw new CommandFormatException("Failed to execute batch: " + Util.getFailureDescription(result));
        }
    }
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        return currentBatch;
    }

    private void discardBatch(CommandContext ctx, String holdbackBatch) {
        BatchManager batchManager = ctx.getBatchManager();
        batchManager.discardActiveBatch();
        if (holdbackBatch != null) {
            batchManager.activateHeldbackBatch(holdbackBatch);
        }
    }
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        Batch batch = batchManager.getActiveBatch();
        List<BatchedCommand> currentBatch = batch.getCommands();
        if(currentBatch.isEmpty()) {
            ctx.printLine("The batch is empty.");
            batchManager.discardActiveBatch();
            return;
        }

        ModelNode composite = new ModelNode();
        composite.get("operation").set("composite");
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        }

        try {
            ModelNode result = ctx.getModelControllerClient().execute(composite);
            if(Util.isSuccess(result)) {
                batchManager.discardActiveBatch();
                ctx.printLine("The batch executed successfully.");
            } else {
                ctx.printLine("Failed to execute batch: " + Util.getFailureDescription(result));
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        Batch batch = batchManager.getActiveBatch();
        List<BatchedCommand> currentBatch = batch.getCommands();
        if(currentBatch.isEmpty()) {
            ctx.printLine("The batch is empty.");
            batchManager.discardActiveBatch();
            return;
        }

        ModelNode composite = new ModelNode();
        composite.get("operation").set("composite");
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        }

        try {
            ModelNode result = ctx.getModelControllerClient().execute(composite);
            if(Util.isSuccess(result)) {
                batchManager.discardActiveBatch();
                ctx.printLine("The batch executed successfully.");
            } else {
                ctx.printLine("Failed to execute batch: " + Util.getFailureDescription(result));
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        Batch batch = batchManager.getActiveBatch();
        List<BatchedCommand> currentBatch = batch.getCommands();
        if(currentBatch.isEmpty()) {
            ctx.printLine("The batch is empty.");
            batchManager.discardActiveBatch();
            return;
        }

        ModelNode composite = new ModelNode();
        composite.get("operation").set("composite");
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        }

        try {
            ModelNode result = ctx.getModelControllerClient().execute(composite);
            if(Util.isSuccess(result)) {
                batchManager.discardActiveBatch();
                ctx.printLine("The batch executed successfully.");
            }
        } catch (Exception e) {
            ctx.printLine("Failed to execute batch: " + e.getLocalizedMessage());
        }
View Full Code Here

Examples of org.jboss.as.cli.batch.BatchManager.discardActiveBatch()

        return currentBatch;
    }

    private void discardBatch(CommandContext ctx, String holdbackBatch) {
        BatchManager batchManager = ctx.getBatchManager();
        batchManager.discardActiveBatch();
        if (holdbackBatch != null) {
            batchManager.activateHeldbackBatch(holdbackBatch);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.