• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF Pg no. 196 SessionContext

 
vrayudu kumar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in pg 192 after calling create() on home stub the container makes the EJBObject and session context.But in page 196 says we can't get a reference to the EJB object. Can anyone explain this?
thanks in advance
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
p:196 seems correct...atleast in my copy of the book.
Please look at the second column, ejbCreate()
U cannot access EJBObject in setSessionContext() method but you
can in ejbCreate(), for a SFSB.
 
vrayudu kumar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur early response.
I think your are correct.
By calling create() on home stub both EJBObject and SessionContext will be created. bt i may not get EJBObject for that bean untill the container links the bean to its SessionContext and EJBObject by calling setSessionContext() and ejbCreate()
Am i correct Vish??
 
Ken Boyd
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are 100%
SCJP1.4
SCWCD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic