Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

home business methods?

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks, Ko Ko. I figured this was the case, but there is nothing like confirmation!

regards
Simon
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic