April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
n//...
npublic class AccountService {
n public void updateAccount(Ccount acount) throws Exception {
n    SecurityManager.requireUserRole(“admin”);
n
n    TransactionManager.beginTransaction();
n    try {
n        //...código de negócio
n        TransactionManager.commit();
n        log.info(“acount updated”);
n   
n    } catch (Exception e) {
n        TransactionManager.rollback();
n        log.warning(“exception throw”, e);
n        throw e;
n    }
n}
n///...
Conceitos de AOP
nImplementação tradicional com todos estes interesses
Segurança
Transações
Logging