aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Home Business methods vs Component Interface Business methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Home Business methods vs Component Interface Business methods" Watch "Home Business methods vs Component Interface Business methods" New topic
Author

Home Business methods vs Component Interface Business methods

Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
For an entity bean, when would you put a business method in a home interface as opposed to puting it in the component interface?

Whats the difference between a business method in home interface vs business method in component interface. HFEJB doesn't explain this very well.

Any one?


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
Ok. I think I found the answer:

Home methods are methods that the bean provider supplies for business logic that is NOT SPECIFIC to an entity bean instance.

Business methods in component interface are methods that the bean provider supplies for business logic that is SPECIFIC to an entity bean instance.
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
For example, if you want to add bonus to all employees you would put the addBonus() in your home interface.

Whereas if you want to add bonus to a specific employee, then you would put that method in the component interface.
cheenu Dev
Ranch Hand

Joined: Nov 13, 2005
Posts: 276
hey dawson,
you give a question and answer it yourself!


cheenujunk@gmail.com
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
yeah, i went through some old threads here and found the answer.
 
Consider Paul's rocket mass heater.
 
subject: Home Business methods vs Component Interface Business methods
 
Similar Threads
private or public EJB method
ObjectNotFoundException Vs NoSuchEntityException
Remove vs Remote
Patterns: Abstract Factory Vs Factory Method
ejb home vs ejb object