• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

regarding ejbHome object reference in setEntityContext

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

If Container is going to make Entity bean instances and setSessionContext is called before Client interacts with Home object. How can we get reference of Home object in setSessionContext?

I have read that you can get Home object reference in setEntityContext in HFEjb book.
 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good question...
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, yes another good question

It's just up to the Container to provide a bean with a reference to its own Home. The Home isn't tied to the *Client*, it's tied to the *Deployment*, so when a bean type (say, Customer bean) is deployed, a Home object (or something that *represents* a Home object... it's really up to the Container to implement it any way the vendor chooses, as long as it follows the behavior of the spec), is created so that any bean of that type that's created, whether in response to a client request or because the Container is pre-loading a pool, can have a reference to its Home... which is really the ONE and only ONE Home for all beans of that specific bean type (Customer, Cart, etc.).

So the Container doesn't need to wait until there is a Client... a Home is guaranteed to exist first, before any bean instances of that particular type are instantiated.

I hope I was answering the right question

cheers,
Kathy
 
raghu vadranam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi kathy,

Thanks for the answer.

raghu
 
reply
    Bookmark Topic Watch Topic
  • New Topic