Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsetSessionContext & UnsetMessageDrivenContext

 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic