Reason for SessionBean interface not having unsetSessionContext(

Discussions

EJB design: Reason for SessionBean interface not having unsetSessionContext(

  1. Hi,
     Why the SessionBean interface does not have unsetSessionContext() method?
    Thanks in advance
    B.Ramasubramanian.
  2. Because it is equivalent to setSessionContext(null)?

  3. Hi,
    Why then EnityBean interface is having unsetEntityContext()
    Bye
    Rama.
  4. In case of Entity beans the remove will delete the row from database.The unsetEntityContext set the Context null and Entity beans can be pooled or in other words how u know that this bean would not be used by client anymore.

    In case of stateful session bean it wouldn't be pooled so no need of unsetSessionContext and stateless session bean maintained by the container between method invocations