I have defined an Aspect with the following pointcut
pointcut transactedMethod() : TransactionBoundary.transactedMethod();
This is an alias created for all transactional methods with some error raised if proper exception is not raised.
public aspect TransactionBoundary {
declare error :
execution(* *..*.transacted*(..) throws !SQLException)
: "A transacted method must throw SQLException";
pointcut transactedMethod() :
execution (* *..*.transacted*(..) throws SQLException);
}
and an around advice like below
Object around() throws SQLException : transactedMethod()
In my code, this works for all methods with signature as transactedInsert(), transactedUpdate()but not for methods with names as transactedOrderInsert()
Is there some issue or something that I am overlooking. Any specific reason why this will not work with method signatures like transactedOrderInsert()? And if it will, what could be the reason that it does not work for me?