• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help me

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
why ejb needs two interfaces(home,component).
Thank for help.
Lakshmi
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why does a bar-stool need three legs?
 
Lakshmi siri
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I didn't get it.Please explain me.
Thanks. Lakshmi
 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If there were less than three legs, it would fall over!

Same with home and component. If you didn't have a home interface, you wouldn't be able to make new beans, find beans, etc. And if you didn't have a component interface, you really wouldn't be able to do anything useful (home is like the cookie cutter, and each component is like a cookie).

--Dale--
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi lakshmi,
I guess........
Home interface acts as gate way for the bean ie its responsibility is creation and destroying the beans.where as Component interface represents bean it self(ofcourse not directly attached).The container want devide and conquer to the extreme by doing so.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have no home then where would you go to find or create an entity? To JNDI? That would mean every entity in the database would have to have a name in JNDI. The volume would be prohibitive. How would the container manage access, since you are not going to thru the container when you do a lookup in JNDI. How would create methods be implemented; JNDI cannot have a name for every bean that might be created. Besides, JNDI cannot instantiate things.

I suppose JNDI could have a reference for one randomly chosen instance of each entity class. Still records for that randomly chosen class would have to be locked more or less permanently. And what would happen when anyone deleted the entity? What if there were no records for a given table, and therefore no entities for the corresponding entity class?

Think about it this way: the difference between a home and a component is the difference between a automobile factory and an automobile.
 
Lakshmi siri
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ALL,
Thanks for your help.
Lakshmi
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic