Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

home business methods?

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

A home business method is defined as a method that returns something other than a component interface reference, that is, data from the entity rather than a reference to the entity itself (page 278 HFEJB).

On page 325 we are told there are three ways to get EJBObject references: 1. a finder method on the home,
2. a create method on the home,
3. a home business method "that returns a reference to the beans component interface."

Surely this last case is a finder method, not a home business method? Or am I missing something? Please understand that I am not trying to split hairs or make a pedentic or trivial point. I got a question wrong in a Mock exam because I misunderstood this issue.

When the book talks about receiving an EJBObject reference as a parameter in a method call, am I right in thinking that this method uses a finder method to get the reference and then simply returns it, or is there more to it?

best regards
Simon
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Simon Ingram:

Surely this last case is a finder method, not a home business method? Or am I missing something?

When the book talks about receiving an EJBObject reference as a parameter in a method call, am I right in thinking that this method uses a finder method to get the reference and then simply returns it, or is there more to it?


The last case is not a finder method. Finder method is at option-1. The last case is just a home business method that returns a reference to the bean's component interface. A home business method can return anything, which is compliant to RMI-IIOP...

On page 278, the book just explains that home business mthods can return something other than EJB Object references... it doesn't mean that it cannot return EJB Object reference... So rather than using finder methods and create methods to get a reference to an EJB Object, we can use home business method to get one...
 
Simon Ingram
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Ko Ko. I figured this was the case, but there is nothing like confirmation!

regards
Simon
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic