Multiple choice technology programming languages

For a session bean, which of the following are the container’s responsibilities?

  1. Call ejbCreate().

  2. Implement javax.ejb.SessionBean.

  3. Implement javax.ejb.EJBContext.

  4. Implement ejbRemove().

  5. Implement setSessionContext().

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Explanation

The EJB container is responsible for calling lifecycle methods like ejbCreate() when a client invokes a create method. The container also provides implementations of context interfaces like EJBContext (specifically SessionContext for session beans). The bean developer is responsible for implementing the SessionBean interface, setSessionContext(), and ejbRemove() methods - these are part of the bean class code.