return (i == 0) ?

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?

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?

A.
The intercept method is NEVER invoked.

B.
The clientreceivesareturnvalueof “zero”.

C.
The client receivesa returnvalue of “not zero”.

D.
The client receivesareturn value of “intercepted”.



Leave a Reply 0

Your email address will not be published. Required fields are marked *