• Post Reply Bookmark Topic Watch Topic
  • New Topic

getting datas in session bean from entity bean

 
deepa sundaram
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a method (passing ID as a parameter) in session bean which has to retrieve datas from entity bean,I want to know how the retrival can be done,like what is primary keys role here?and how its looking right record and retriving?I am new to EJB,can anyone explain me?

Thanks in advance
dkarun
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
410
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepa,
A primary key is a field (or fields) that uniquely identify a row in the database. You pass the primary key to a findByPrimaryKey finder method on the home interface of the entity bean. This will give you back the bean you are looking for.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!