• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

quick question on ejbCreate

 
Bob Walker Jr
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen it mentioned in many places that signature of ejbCreate for a CMP entity bean should be the primary key type (confirmed in the specs also) but the actual return value in the method code should be null. I checked the specs (section 10.6.4) but it does not say anywhere that the return value should be null. How come
Where the hell are we getting this rule from?
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy
It *is* in the spec, but the spec makes it *really* hard to find these things. On page 171, section 10.5.2 "Bean Provider's entity bean instance's view"
It says:
" The implementation of the Bean Provider's ejbCreate<method> methods should be coded to return a null."
cheers,
Kathy
 
Bob Walker Jr
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, Kathy. I was going nuts over this. I thought that everything about ejbCreate() would be there in 10.6.4 which is: "Responsibilities of Enterprise Bean Provide" : "ejbCreate<method> method". So basically to learn every thing about something, I need to read every line of the spec and then organize the content myself.
Kathy, I serious hope your book takes care of this
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that's the most challenging thing about the spec... some really important 'rules' show up in only one place, rather than redundantly everywhere they *should* be. So you can read a section that should have everything all summarized, but it will leave something out that appears only somewhere *else* Arrghh!
Cheers,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic