• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HF EJB Session bean question

 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question on Question #17 in chapter 4 of the Head First EJB book. The match for "local home" is "d- can be used to retrieve the EJBLocalObject." As I understand, the only method in the local home is the
remove(Object) method. I think it should be that you can get the EJBLocalHome from the SessionContext object.
Is the answer in the book correct?
THanks
Brian
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy,
Brian, this is an excellent question to ask, because it's confusing to people both on mock exams and in the real exam, so thanks for giving me a chance to clear that up... (first off, the question and answers are correct, and now I'll explain what we mean).
When we say "local home", we mean the client view of the local home, so that includes create() or find() methods that will return the EJBLocalObject (and not the EJBObject).
On the exam, if you see "local home" or "home interface", then we mean *anything* that can be available to the client in the home interface (local or Remote -- if it matters whether it is local or Remote, we will say so in the questions). So that includes both the things the Bean Provider writes in their home interface, as well as things from javax.ejb.EJBLocalHome. (same is true with javax.ejb.EJBHome).
If we want to ask about the things which are ONLY in the actual javax.ejb.EJBHome interface (or javax.ejb.EJBLocalHome interface), then we'll name the interface explicitly.

cheers,
Kathy
 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for clearing that up for me, I had to read that a couple of times but then the light went on
One more question on question #9 in Chapter 6, "Which methods from the ENtity Context interface can be invoked from within the ejbCreate method?" Option B, the getEJBObject is selected, but I thought that the EJBObject was not available until the postCreate method?
Thanks again for the help!
Brian
 
reply
    Bookmark Topic Watch Topic
  • New Topic