Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ch-5 Q No.5 Coffee Cram Mock Exam

 
Puneet Vashisht
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which are ways in which a client can get a reference to an existing entity object's remote component interface?
A. Call ejbCreate()
B. Obtain the reference from the handle.
c. Call a method on the entity object's primary key.
D. Recieve the reference as a parameter in a method call.
E. Use a finder method defined in the remote home interface.


I think i'vent understood option D well. How can the client even recieve a reference as a parameter, it can only get it as a return value. My point is that a bean would never call method on a client, so how could the reference be received as a parameter.

Same is with Q No 3.

Thanks,
Puneet
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you're right. The bean would never call a method in the client. However, something else might. That is, another client gets a reference to the bean, than calls a method on your client that passes that reference as a parameter. I'm not sure why you'd want to do that, but that didn't stop my former coworkers from doing it continously.
 
B.Sathish
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parameter actually means return type here. What they mean is you can call a method on a bean, that method can look up and return the component interface reference of another bean which you can receive as the return value of that call
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic