Examples of activateNewBatch()


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

        BatchManager batchManager = ctx.getBatchManager();
        if (batchManager.isBatchActive()) {
            currentBatch = "batch" + System.currentTimeMillis();
            batchManager.holdbackActiveBatch(currentBatch);
        }
        batchManager.activateNewBatch();
        return currentBatch;
    }

    private void discardBatch(CommandContext ctx, String holdbackBatch) {
        BatchManager batchManager = ctx.getBatchManager();
View Full Code Here

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

                }
            }
        } else if(name != null) {
            throw new CommandFormatException("'" + name + "' not found among the held back batches.");
        } else {
            activated = batchManager.activateNewBatch();
        }

        if(!activated) {
            // that's more like illegal state
            throw new CommandFormatException("Failed to activate batch.");
View Full Code Here

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

        }
    }

    private void executeBatch(final CommandContext ctx) throws IOException {
        final BatchManager batchManager = ctx.getBatchManager();
        if (batchManager.activateNewBatch()) {
            final Batch batch = batchManager.getActiveBatch();
            for (String cmd : commands) {
                try {
                    batch.add(ctx.toBatchedCommand(cmd));
                } catch (CommandFormatException e) {
View Full Code Here

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

            }
        } else if(name != null) {
            ctx.printLine("'" + name + "' not found among the held back batches.");
            return;
        } else {
            activated = batchManager.activateNewBatch();
        }

        if(!activated) {
            // that's more like illegal state
            ctx.printLine("Failed to activate batch.");
View Full Code Here

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

            }
        } else if(name != null) {
            ctx.printLine("'" + name + "' not found among the held back batches.");
            return;
        } else {
            activated = batchManager.activateNewBatch();
        }

        if(!activated) {
            // that's more like illegal state
            ctx.printLine("Failed to activate batch.");
View Full Code Here

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

        BatchManager batchManager = ctx.getBatchManager();
        if (batchManager.isBatchActive()) {
            currentBatch = "batch" + System.currentTimeMillis();
            batchManager.holdbackActiveBatch(currentBatch);
        }
        batchManager.activateNewBatch();
        return currentBatch;
    }

    private void discardBatch(CommandContext ctx, String holdbackBatch) {
        BatchManager batchManager = ctx.getBatchManager();
View Full Code Here

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

            }
        } else if(name != null) {
            ctx.printLine("'" + name + "' not found among the held back batches.");
            return;
        } else {
            activated = batchManager.activateNewBatch();
        }

        if(!activated) {
            // that's more like illegal state
            ctx.printLine("Failed to activate batch.");
View Full Code Here

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

        } else {
            tryBlock.setCatchRequest(batch.toRequest());
        }
        tryBlock.setInFinally();
        batchManager.discardActiveBatch();
        batchManager.activateNewBatch();
    }
}
View Full Code Here

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

        final BatchManager batchManager = ctx.getBatchManager();
        if(batchManager.isBatchActive()) {
            throw new CommandFormatException("try is not allowed while in batch mode.");
        }

        if(!batchManager.activateNewBatch()) {
            // that's more like illegal state
            throw new CommandFormatException("Failed to activate batch mode for try.");
        }
        TryBlock.create(ctx);
    }
View Full Code Here

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

            throw new CommandLineException("try block is empty.");
        }
        tryBlock.setTryRequest(tryBatch.toRequest());
        tryBlock.setInCatch();
        batchManager.discardActiveBatch();
        batchManager.activateNewBatch();
    }
}
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.