aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes UnsetSessionContext & UnsetMessageDrivenContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "UnsetSessionContext & UnsetMessageDrivenContext" Watch "UnsetSessionContext & UnsetMessageDrivenContext" New topic
Author

UnsetSessionContext & UnsetMessageDrivenContext

Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
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?
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
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


Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Dear all,
Because of Session Bean and Message Driven Bean do not have unsetSessionContext and unsetMessageDrivenContext, do we have to make those context equals "null" inside ejbRemove?
thanks
daniel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UnsetSessionContext & UnsetMessageDrivenContext