Question
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.AfterThrowing;
@Aspect
public class AfterThrowingExample
{
@AfterThrowing(
pointcut="com.xyz.myapp.SystemArchitecture.dataAccessOperation()",
throwing="ex")
public void doRecoveryActions(DataAccessException e)
{
throw new IllegalArgumentException();
// ...[/expand]
}
}
a.
Runtime Error
b.
IllegalArgumentException
c.
BeanCreation Exception
d.
None of the mentioned
Posted under Java Spring Framework
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be the output of the code snippet?
Similar Questions
Discover Related MCQs
Q. Which instantiation model is supported by AspectJ?
View solution
Q. Which tag in XML is used to declare @Before advice’s method?
View solution
Q. PointCut definitions can’t be reused again
View solution
Q. Annotation used to refer poincuts?
View solution
Q. Language used to set various kinds of join points
View solution
Q. Spring AOP only supports method execution join points for the beans in its IoC container
View solution
Q. The annotations must be added to the implementation class but not the interface
View solution
Q. Which of the following pattern is used to match bean name?
View solution
Q. Bean name patterns are supported by all configurations(XML,Java,AspectJ)
View solution
Q. Expressions which returns Parameters of pointcuts?
View solution
Q. Are logical operators valid in pointcut expressions?
View solution
Q. Method which checks if all target classes are matched
View solution
Q. Spring supports operations on pointcuts:-
View solution
Q. Pointcuts can be composed using:-
View solution
Q. Pointcut used to parse an AspectJ pointcut expression string
View solution
Q. Which special type of advice is used to implement an interface?
View solution
Q. Introduction advice helps in implementing multiple inheritance.
View solution
Q. In introduction advice you have to modify class to introduce new methods
View solution
Q. How does an Introduction advice do this in Spring?
View solution
Q. Annotation used to declare an introduction
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Spring Framework? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!