aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Entity Home with 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 "Entity Home with Business Methods" Watch "Entity Home with Business Methods" New topic
Author

Entity Home with Business Methods

Chetan Sahasrabudhe
Ranch Hand

Joined: Aug 09, 2004
Posts: 75
Hello,

As per my understanding, for a bean there is always one home interface reference. Whenever the client wants to get the Component reference. Home reference is used and hence the client get a customized bean (stateful) for his/her use. While going through chpter 5 entity bean intro, Kathy has mentioned that the Home can aswell hold business methods for the bean. Some how I have started thinking that the business methods in home will start acting as a static methods. i.e. methods bound to class kind of scenario. With this assumption I think if my business method is looking for some specific info in bean then this kind of call will be confusing.

Please explain


Thanks & Regards<br />Chetan
Swamy Nathan
Ranch Hand

Joined: May 16, 2004
Posts: 187
Home business methods are for business methods that are not pertaining to a single entity (row in database)
for batch processing of entities
If your business method is looking for some specific info in bean then it wont be a good candidate for a home business method.

I dont know how it is actually implementedbut if I were to make my own ejb container I would make the conatiner generated class which actually implemenbts the home interface inside the conatiner a singleton.

My knowledge is based on my imagination and what little I have read.
Chetan Sahasrabudhe
Ranch Hand

Joined: Aug 09, 2004
Posts: 75
Hello Swamy,

Thanks for the detail explaination. Rather it was too early for me to put this question on the forum. Later in the chapter it is explained that home can handle consolidated operation requests.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity Home with Business Methods