Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

UnsetSessionContext & UnsetMessageDrivenContext

 
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?
 
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
 
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
 
    Bookmark Topic Watch Topic
  • New Topic