Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Reference to an existing entity object's remote interface

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Identify how a client can obtain a reference to an existing entity object's remote interface? [Check all correct answers]

1. Invoke the findByPrimaryKey() finder method.
2. Invoke the getHandle() method on the remote interface.
3. Call a create() method on the remote interface.
4. Execute a home business method that returns the reference.
5. Call the getRef() method on the remote interface.

Answer given is 1, 2, 4.

I say only 1 is correct. getHandle will give you a Handle not the remote interface. But ok, let's accept you can get the remote interface using that handle. Number 4 is the one I don't like one bit. Home business methods are not meant to do things specific to one entity. Page 278 of HFEJB: "(Home business methods) are perfect for queries where the client just wants the entity data, not references to the entities themselves". Ok, maybe it's not an error to do it, but that's not what home business methods are meant for and I wouldn't say 4 is a correct option. Even the explanation they give is contradictory:

"A client can get a reference to an existing entity object's remote interface in any of the following ways:

* Receive the reference as a parameter in a method call.
* By using a finder method defined in the entity bean's remote home interface.
* By obtaining the reference from the entity object's handle"

I don't see home business methods here ... I think they got the parameter-in-a-method-call option mixed up with the home business method thingo ...

What u say?
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your concerns seem pretty valid to me. Actually, there are some discrepancies between the options and the explanations provided in this mock exam.
 
This cake looks terrible, but it tastes great! Now take a bite out of this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic