JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Spring interview questions part 28
Spring interview questions part 28
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Annotation used to refer poincuts?
A. @Pointcut
B. @PointcutExecution
C. @PointcutBefore
D. None of the mentioned
Show Correct Answer
Correct Answer is :
@Pointcut
2. what will be the output of the code snippet? package com.apress.springrecipes.calculator; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; @Aspect public class CalculatorPointcuts { @Pointcut("execution(* *.*(..))") public void loggingOperation() {} } package com.apress.springrecipes.calculator; @Aspect public class CalculatorLoggingAspect { ... @Before("CalculatorPointcuts.loggingOperation()") public void logBefore(JoinPoint joinPoint) { ... } @AfterReturning( pointcut = "loggingOperation()", returning = "result") public void logAfterReturning(JoinPoint joinPoint, Object result) { throw new IllegalArgumentException(); } @AfterThrowing( pointcut = "CalculatorPointcuts.loggingOperation()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, IllegalArgumentException e) { ... } @Around("CalculatorPointcuts.loggingOperation()") public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { ... } }
A. Runtime Error
B. IllegalArgument Exception
C. BeanCreation Exception
D. None of the mentioned
Show Correct Answer
Correct Answer is :
BeanCreation Exception
3. Language used to set various kinds of join points
A. AspectJ pointcut language
B. Java pointcut language
C. XML pointcut language
D. None of the mentioned
Show Correct Answer
Correct Answer is :
AspectJ pointcut language
4. Spring AOP only supports method execution join points for the beans in its IoC container
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
5. Is the following pointcut expression correct? execution(* ArithmeticCalculator.*(..))
A. Yes
B. No
C. If every target class is in same package
D. Depends where target class is located
Show Correct Answer
Correct Answer is :
If every target class is in same package
6. The annotations must be added to the implementation class but not the interface
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
7. Which of the following pattern is used to match bean name?
A. bean(*Calculator)
B. bean(Calculator)
C. bean(com.appress.spring.Calculator)
D. None of the mentioned
Show Correct Answer
Correct Answer is :
bean(*Calculator)
8. Bean name patterns are supported by all configurations(XML,Java,AspectJ)
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
FALSE
9. Expressions which returns Parameters of pointcuts?
A. target
B. args
C. none of the mentioned
D. all of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
10. Are logical operators valid in pointcut expressions?
A. Yes
B. No
C.
D.
Show Correct Answer
Correct Answer is :
Yes
11. Method which checks if all target classes are matched
A. matches()
B. pair()
C. matchTargetClass()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
matches()
12. Spring supports operations on pointcuts:-
A. notably
B. union
C. intersection
D. all of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
13. Pointcuts can be composed using:-
A. org.springframework.aop.support.Pointcuts class
B. composablePointcut class
C. all of the mentioned
D. none of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
14. Pointcut used to parse an AspectJ pointcut expression string
A. org.springframework.aop.aspectj.AspectJExpressionPointcut
B. org.springframework.aop.aspectj.AspectJExpressionPointcutString
C. org.springframework.aop.aspectj.AspectJExpressionString
D. org.springframework.aop.aspectj.AspectJPointcuttoString
Show Correct Answer
Correct Answer is :
org.springframework.aop.aspectj.AspectJExpressionPointcut
15. Spring supports most of the popular ORM (or data mapper) frameworks.
A. Hibernate
B. JDO
C. JPA
D.
Show Correct Answer
Correct Answer is :
0
16. ORM which isn’t supported by Spring:-
A. Hibernate
B. JDO
C. TopLink
D.
Show Correct Answer
Correct Answer is :
0
17. An ORM framework persists your objects according to the mapping metadata you provide.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
18. Database Engine which uses low memory consumption and easy configuration.
A. SQL
B. MySQL
C. Apache Derby
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Apache Derby
19. Mode which Derby prefers to run in:-
A. embedded
B. client/server
C. all of the mentioned
D. none of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
20. For testing purposes, the client/server mode is more appropriate.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
Similar Interview Questions
Search for latest jobs
Find Jobs