nerdexam
Oracle

1Z0-860 · Question #208

A developer creates a stateful session bean that is used by many concurrent clients. The clients are written by other development teams and it is assumed that these clients might not remove the bean…

The correct answer is C. Release references to resources in a@PreDestroy annotated method. D. Release references to resources in a @PrePassivate annotated method. E. Re-establish references to resources in a (©PostActivate annotated method. See the full explanation below for the reasoning.

Question

A developer creates a stateful session bean that is used by many concurrent clients. The clients are written by other development teams and it is assumed that these clients might not remove the bean when ending their session. The number of concurrent sessions will be greater than the defined bean cache size. The developer must consider that the state of the session bean can be influenced by either passivation or timeout. Which three actions should the developer take to make the bean behave correctly in passivation and timeout situations? (Choose three.)

Options

  • ARelease references to resources in a@Removeannotated method.
  • BRe-establish references to resources in an @lnit annotated method.
  • CRelease references to resources in a@PreDestroy annotated method.
  • DRelease references to resources in a @PrePassivate annotated method.
  • ERe-establish references to resources in a (©PostActivate annotated method.

How the community answered

(32 responses)
  • A
    16% (5)
  • B
    9% (3)
  • C
    75% (24)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice