Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SB: getEJBLocal from ejbCreate

 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The spec says that you can call getEJBObject and/or getEJBLocalObject from the ejbCreate/ejbRemove methods. Why is this legal ?

To my understanding a client has nothing to do with the life cycle of a stateless sb. Its the container that decides when these sb are created or destroyed.

The only thing a client can be sure of is:

- When calling create() he will get a object reference to a session bean instance on which business methods can be executed.

- When calling remove() he is sure that the object reference is destroyed. Doing additional calls on this reference will yield in a NoSuchObjectException/NoSuchObjectLocalException

So, chances are that a ejbCreate/ejbRemove is called while there is no object reference associated with the bean instance. Is this correct ?
 
Jim Janssens
Ranch Hand
Posts: 210
 
Chetan Sahasrabudhe
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Koen whatz UTFS ?
[ July 21, 2005: Message edited by: Chetan Sahasrabudhe ]
 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the f***** search
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic