Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session/Entity Beans  RSS feed

 
Shanthi Priya
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
Session beans must have atleast one or more create() methods and Entity beans can have zero or more create() methods. why??

Thanks!
 
Dan T
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For entity beans, we might not have to create any new data in the database. Calling create() creates a row in the database, along with the ejbObject. How about if we want to update the existing record of John Doe's telephone number? We can call the findByPrimaryKey(primarykey) method defined in your Home interface. You must have findByPrimaryKey method must return the Remote/Local component interface and declare (RemoteException if Remote) and FinderException.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!