File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFEJB Errata? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFEJB Errata?" Watch "HFEJB Errata?" New topic
Author

HFEJB Errata?

Rahul Mishra
Ranch Hand

Joined: Jan 22, 2006
Posts: 211
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?


OCMJEA/SCEA, SCDJWS, SCBCD 1.3, SCJP 1.4
My SCEA experience:http://javalogue.blogspot.com/
Sue Pillai
Ranch Hand

Joined: Nov 04, 2004
Posts: 89
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 ]

Sue

SCJP 1.2
SCWCD 1.4
SCBCD 5.0
Rahul Mishra
Ranch Hand

Joined: Jan 22, 2006
Posts: 211
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: HFEJB Errata?