• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

HF: Page291 Q.3

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The Q.3 says
Which are ways in which a client can get a reference to an existing entity object's local component interface?(Choose all that apply.)

A. Call ejbCreate()
B. Call getSessionContext()
C. Obtain the reference from the handle.
D. Receive the reference as a parameter in a method call.
E. Use a finder method defined in the local home interface.

Correct answers are D and E. That are fine.
But Ans. A is wrong. And the reason is said that "we said existing"

Even if its a NEW entity then also answer A is wrong. Because the client can NEVER call ejbCreate(). She can call create() not ejbCreate()...
Is my understanding correct?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also think so :-)
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Appreciate if someone cas explain why option C is wrong.

Sawan
 
Purvesh Vora
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sawan,

Option C is wrong because there are no HANDLE for the LOCAL interface. Handles are only for Remote interfaces.
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh. My mistake. I should have read the question carefully.


Yes your are right the client can call the create() method and the container will call the ejbCreate since its an callback method.

Thanks.
[ May 10, 2005: Message edited by: sawan parihar ]
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic