This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

SessionContext Interface question

 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1: why is there no unsetSessionContext() in SessionContext Interface?
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marylin, Thanks a lot for putting the questions in diffrenet threads.
 
Avijeet Dash
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This contradicts the intended use of ejbRemove() for entity beans, for which ejbRemove() is called when the bean is being destroyed in the persistent store. If you take a close look at the entity EJB state diagram, another container callback is used to notify a bean that it is being moved from the "pooled" state to the "does not exist" state: unsetEntityContext(). As an instructor to hundreds of students who're learning EJBs, it's often a nightmare to explain to them that ejbRemove() for session beans and unsetEntityContext() for entity beans represent the same event transitions, but ejbRemove() for entity beans really means destruction.
Here's a proposal, though the migration to support it would be difficult: how about changing ejbRemove() in the SessionBean interface to be unsetSessionContext() and alter ejbRemove() in the entity bean interface to be ejbDestroy()? In this scenario, the ambiguous ejbRemove() wouldn't exist in either interface and consistency would exist between setXXXContext() and unsetXXXXContext() callbacks.
http://www.onjava.com/pub/a/onjava/2001/02/28/ejb.html
 
I would challenge you to a battle of wits, but I see you are unarmed - shakespear. Unarmed tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic