• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HFEJB Errata?

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HFEJB Page 325 mentions that if a client wants a refernce to the EJB Object he can also call a home business method that returns the bean's component interface

The book at a later stage mentions that Home Business methods should not be used to return reference but data or value objects..

I did not find this in Errata - confirmed/unconfirmed.

Can someone referring the book agree/disagree?
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure what you are arriving at, but I hope my explanation will help.

The home interface has 3 kinds of methods:

1) create methods that return references to component interface

2) finders or getters that return reference to the component interface or a collection of them. The reason for having these is to find an existing bean

3) the business methods that return Value objects. The reason for having a business method is to use these value objects and get the entity data or a collection of them, so as to reduce network calls. That is, the bean can stay in pool to do the deed and does not need an EJBObject

What I understood is that 2) & 3) that are collectively called business methods, may return EJBObject references or value objects. Check pg 278.

The book at a later stage mentions that Home Business methods should not be used to return reference but data or value objects..



which page are you referring to here?
[ April 06, 2006: Message edited by: Sue Pillai ]
 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sue,

Let me elaborate..if you look at Page 325 Circled Point 3..it mentions that home Business methods can return a reference to bean's component interface...

Now if you look at 346..sub topic..What to put in a home business method...it says and i Quote "...and that don't return the beans component interface..."

If i have to return a EJB Object reference..i'd rather use a finder...the entire purpose of a homeBusiness Method is to return data ..

Correct me if i am wrong..but i sense a contradiction
 
I found some pretty shells, some sea glass and this lovely tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic