Scenario:A developer from EPractize Labs creates a stateful session bean named TestSessionManager for managing Skill Evaluation Lab test session. It is assumed that TestSessionManager clients might not remove the bean when ending their session. EJB load testing team concluded that the number of concurrent sessions are greater than the defined bean cache size. The developer must consider that the state of the TestSessionManager bean can be influenced by either passivation or timeout. |
|
Which three actions should the EJB developer take to make the TestSessionManager behave correctly in passivation and timeout situations? |
Choice 1 | Release references to resources in a @Remove annotated method. |
Choice 2 | Re-establish references to resources in an @lnit annotated method. |
Choice 3 | Release references to resources in a @PreDestroy annotated method. |
Choice 4 | Release references to resources in a @PrePassivate annotated method. |
Choice 5 | Re-establish references to resources in a @PostActivate annotated method. |