private void runTransactions()
	{
		while (transactionCounter < Globals.MAX_NOF_TRANSACTIONS_PER_SERVER) {
			if (!gui.getPauseStatus()) {
				int newId = serverId * Globals.MAX_NOF_TRANSACTIONS_PER_SERVER + transactionCounter;
				gui.newTransactionTab(newId);
				println("Transaction " + newId + " arrived.");
				activeTransaction = new Transaction(newId, this, null);
				if (!activeTransaction.runTransaction()){
					nofAborts++;
				}
				activeTransaction = null;
				transactionCounter++;
				println("Transaction " + newId + " ended.");
				gui.updateTransactionCounters(nofAborts, transactionCounter);
				Globals.randomSleep(Globals.MIN_ARRIVAL_WAIT, Globals.MAX_ARRIVAL_WAIT);
			}
			else {
				// Wait a little while to prevent hogging the CPU
				Globals.randomSleep(100, 100);
			}
		}
		println("Max # of transactions reached, no more transactions will be started.");
	}