Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

quick question on ejbCreate

 
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?
 
Cowgirl and Author
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
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
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic