Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ques on ejbCreate() mthd  RSS feed

 
Kunaal A Trehan
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have seen that in most of the entity bean.
In the ejbCreate() method when we create an entity bean,90% of the times return null; is written at the end of the method.

Though we shd send primary key object
But still we send the same and it works any idea why??

Rgds
Kunal
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because this class is abstract and is extended by ...BMP class which overrides this method and calls ejbCreate of super class(EntityBean), gets an instance of DAO implementation class and calls its create method. This create method is implemented/overridden by container. which returns PrimaryKey object of specific type of Bean.
 
Kunaal A Trehan
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnx for clearing the doubt

Rgds
Kunal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!