Oracle
1Z0-860 · Question #170
A developer writes an interceptor class called Foolnterceptor containing the following Aroundlnvoke method: 11. @Aroundlnvoke 12. public Object intercept(lnvocationContext ctx) { 13. return…
The correct answer is D. The client receives a return value of "intercepted". See the full explanation below for the reasoning.
Question
A developer writes an interceptor class called Foolnterceptor containing the following Aroundlnvoke method: 11. @Aroundlnvoke 12. public Object intercept(lnvocationContext ctx) { 13. return "intercepted"; 14.} Foolnterceptor is applied to a business method in a stateless session bean: 11. @lnterceptors(Foolnterceptor.class) 12. public String testzero(int i) { 13. return (i == 0) ? "zero""not zero"; 14. } Which describes the result when a client invokes the testzero method with a value of 1?
Options
- AThe intercept method is NEVER invoked.
- BThe client receives a return value of "zero".
- CThe client receives a returnvalue of "not zero".
- DThe client receives a return value of "intercepted".
How the community answered
(29 responses)- A3% (1)
- B10% (3)
- C3% (1)
- D83% (24)
Community Discussion
No community discussion yet for this question.