We have setEntityContext and unsetEntityContext for an entity bean. But for a session bean and a MessageDriven Bean, we have only setSessionContext and setMessageDrivenContext() method. Can somebody explain, for a session and MessageDriven bean, why we do not have unsetSessionContext and unsetMessageDrivenContext?
posted 12 years ago
In Session Beans and MDB's,you can always use the ejbRemove to do the instance cleanup work where as in entity beans calling of ejbRemove means the deletion of the entity from the underlying datastore.So there must be a separate method to handle the instance cleanup.And unsetEntityContext is the place where you do that HTH