Oracle
1Z0-860 · Question #233
A developer creates a stateless session bean. This session bean needs data from a remote system. Reading this data takes a long time. Assume that the data will NOT change during the lifetime of the…
The correct answer is E. Read the data ina method which is annotated with (5)PostConstruct. See the full explanation below for the reasoning.
Question
A developer creates a stateless session bean. This session bean needs data from a remote system. Reading this data takes a long time. Assume that the data will NOT change during the lifetime of the bean and that the information to connect to the remote system is defined in JNDI. Which statement describes how to manage the data correctly?
Options
- ARead the datain the bean's constructor.
- BThe data can only be read in the bean's business methods.
- CRead the data in a method which is annotated with @PrePassivate.
- DRead the data in a method which is annotated with @Post Activate.
- ERead the data ina method which is annotated with (5)PostConstruct.
How the community answered
(30 responses)- A3% (1)
- C7% (2)
- D13% (4)
- E77% (23)
Community Discussion
No community discussion yet for this question.