• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Entity Home with Business Methods

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic