Oracle
1Z0-895 · Question #31
Given the following client-side code that makes use of the session bean Foo: 10. @EJB Foo bean1; 12. @EJB Foo bean2; // more code here 20. boolean test1 = beanl.equals(bean1); 21. boolean test2 =…
The correct answer is B. If Foo is stateful, test1 is true, and test2 is false. C. If Foo is stateless, test1 is true, and test2 is true. See the full explanation below for the reasoning.
Question
Given the following client-side code that makes use of the session bean Foo: 10. @EJB Foo bean1; 12. @EJB Foo bean2; // more code here 20. boolean test1 = beanl.equals(bean1); 21. boolean test2 = beanl.equals(bean2) ; Which three statements are true? (Choose three)
Options
- AIf Foo is stateful, test1 is true, and test2 is true.
- BIf Foo is stateful, test1 is true, and test2 is false.
- CIf Foo is stateless, test1 is true, and test2 is true.
- DIf Foo is stateless, test1 is true, and test2 is false.
- EIf Foo is singleton, test1 is true, and test2 is true.
- FIf Foo is singleton, test1 is true, and test2 is false.
How the community answered
(69 responses)- A6% (4)
- B78% (54)
- D1% (1)
- E12% (8)
- F3% (2)
Community Discussion
No community discussion yet for this question.