code: @Override
      protected void doHandle(CommandContext ctx) throws CommandFormatException {
  
          Batch batch = ctx.getBatchManager().getActiveBatch();
          if(batch == null) {
              throw new CommandFormatException("No active batch.");
          }
          batch.clear();
      }
docs: /* (non-Javadoc)
  @see org.jboss.as.cli.handlers.CommandHandlerWithHelp#doHandle(org.jboss.as.cli.CommandContext)