This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
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

HF Pg no. 196 SessionContext

 
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
 
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??
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are 100%
SCJP1.4
SCWCD
 
I have gone to look for myself. If I should return before I get back, keep me here with this 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