[aspectwerkz-user] Query About Tansaction Aspect
Ravi Kumar <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
hi all,
i have a developed transaction aspect with the following methodology
i constructed a Aspect Class with three methods described below :
1. beforeTransaction
---- which will do con.setAutoCommit(false)
Pointcut expression is call(some method which will executes batch
of SQL queries)
Advice is type is before
2. After Transaction
---- which will do con.commit();
Pointcut expression is call(some method which will executes batch
of SQL queries)
Advice is type is After
3. AfterThrowingTransaction
---- which will do con.rollback()
Pointcut expression is call(some method which will executes batch
of SQL queries)
Advice is type is After throwing(java.sql.SQLException+)
is this the right way to do transaction and which expression in have
use( call or execution ) in pointcut.
with regards
ravi