After throwing advice by R4R Team

3 After throwing advice:
After throwing advice executes when a matched method execution exits by throwing an exception. It is declared inside an <aop:aspect> using the after-throwing element:
 

<aop:aspect id="afterThrowingExample" ref="loginAspect">

<aop:after-throwing

pointcut-ref="businessService"

throwing="ex"

method="logRequiredTask"/>

...

</aop:aspect>

The logRequiredTask method must declare a parameter named ex.  For example, the method signature may be declared as:

public void logRequiredTask(DataAccessException ex) {...

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!