• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Entity Context - how it finds its bean's primary keys?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,
I really need your help... May be my question is Junk... but, please try to spend some time on this.
I was trying to understand how entity context is implemented by the container. it has methods to fetch the primary key related to the bean instance... but, i was wondering how does it know to which bean instance it is currently related to. so, when ever a bean is swapped out and swapped in with different DB Data how come context retrieves the correct primary key?

Any Idea ....
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi raghavendra ,
Whenever the container creates the bean instances it gives it a EntityContext and places the bean in the pool.

After say user calls the create on the home interface the container will pull the bean from the pool call the ejbCreate and then will insert the record in the database. After the record has been inserted the container will create a EJBObject for the same and updates the EntityContext with the new primary key . The EJBObject created will be returned back to the client.

hope that helps
[ April 20, 2005: Message edited by: sawan parihar ]
 
Arthur, where are your pants? Check under this tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic