File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Home Business methods vs Component Interface Business methods

 
Richard Green
Ranch Hand
Posts: 536
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Richard Green
Ranch Hand
Posts: 536
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 536
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 276
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey dawson,
you give a question and answer it yourself!
 
Richard Green
Ranch Hand
Posts: 536
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, i went through some old threads here and found the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic