A developer successfully creating and tests a stateful bean following deployment, intermittent "NullpointerException" begin to occur, particularly when the server is hardly loaded. What most likely to related problem. a) setSessionContext b) ejbCreate c) ejbPassivate d) beforeCompletion e) ejbLoad
a) setSessionContext - I wouldnt expect a problem here as you usually only assign the SessionContext to a an instance variable, there is also no statefull bean pool so the problem wouldnt be more noticable during server startup. b) ejbCreate - A problem could occur if not all expected parameters are supplied - This is dependant on the clients input. c) ejbPassivate - I wouldn't expect a problem here since you should only be releasing resources that cannot be serialized, and the problem occurs especially when the server is hardly loaded - a bean needs to have been associated with the client first before its passivated. d) beforeCompletion - I would only expect a nullpointer here if you had bad business logic and had released a resource earlier in the transaction that you still needed. e) ejbLoad - There is no ejbLoad in statefull session beans
I find the question a bit vaque and dont remember getting a similar question during the exam - which mock exams are you using?