Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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

Reference to an existing entity object's remote interface

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic