• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Frits Walraven
  • Himai Minh

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

Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic