Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which advice combines all advices into one?
Correct Answer is : None of the mentioned
2. An advice can access the current join point information by declaring an argument of type org.aspectj.lang.AdvicePoint in the advice method signature.
Correct Answer is : FALSE
3. Which interface is implemented to specify precedence of aspects?
Correct Answer is : Ordered
4. Alternative annotative way to specify precedence of aspects?
Correct Answer is : @Order
5. Method which returns the highest priority of aspect’s join point?
Correct Answer is : getOrder
6. what will be the output of the code snippet
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]
}
}
Correct Answer is : BeanCreation Exception
7. Which instantiation model is supported by AspectJ?
Correct Answer is : all of the mentioned
8. Which tag in XML is used to declare @Before advice’s method?
Correct Answer is : aop:before
9. Tag used to enable AspectJ annotation?
Correct Answer is : aop:aspectj-autoproxy
10. Tag which defined Spring AOP configurations
Correct Answer is : aop:config
11. What are the ways to declare an advice?
Correct Answer is : all of the mentioned
12. Applying aspects to your target objects
Correct Answer is : Weaving
13. Special compiler used during weaving
Correct Answer is : ajc
14. Name of the process when targe classes are loaded into JVM
Correct Answer is : load-time weaving
15. How to weave your classes using argument while compiling?
Correct Answer is : -javaagent:CLASSPATH
16. XML Element to include load-time weaver
Correct Answer is : context:load-time-weaver
17. You also have to include suitable load-time weaver’s configuration in XML