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 ...