protected void applyTransaction(AccountTransaction aTransaction) throws NotEnoughFundsException, InactiveAccountException {
        if (!isActive) {
            throw new InactiveAccountException("Unable to apply "
                    + aTransaction.getType() + " of amount " + aTransaction.getAmount() + " to account " + id);
        }

        synchronized (transactionList) {
            if (AccountTransaction.TransactionType.DEPOSIT == aTransaction.getType()) {
                transactionList.add(aTransaction);
                balance += aTransaction.getAmount();

            } else if (AccountTransaction.TransactionType.WITHDRAWAL == aTransaction.getType()) {
                if (balance < aTransaction.getAmount()) {
                    throw new NotEnoughFundsException("Unable to withdraw "
                            + aTransaction.getAmount() + "$ from account " + id + " - current balance is " + balance);
                }
                transactionList.add(aTransaction);
                balance -= aTransaction.getAmount();

            } else {
                throw new IllegalArgumentException("The transaction passed in has an invalid type: " + aTransaction.getType());
            }
        }
    }
Returns the transactions attribute.

@return The transactions value.
samples/aspectj/src/main/java/org/apache/shiro/samples/aspectj/bank/Account.java