hi all According to the section 10.6.4 of the EJB 2.0 Specs, the return type of ejbCreate method of a CMP enity bean is the primary key type of the bean. The primary key field cannot be a primitive type, so that means that ejbCreate cannnot return a primitive type. However, I have seen examples in which ejbCreate returns the int return type. Also void in some cases. Can someone please comment on this ? Thanks Vipin
Hello, I can hardly believe that ejbCreate can return primitive, because it must return anything which is child of java.lang.Object. NOTE, CMP beans should actually return "null" in ejbCreate, and BMP "real" PK. about "void" return type for ejbCreate - this is signature for session beans, not entity beans.
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz Exam 1Z0-810: Upgrade to Java SE 8 Programmer Study Guide and Quiz
Joined: Nov 15, 2003
hi Thanks for your reply. I wanted to be sure, because I have seen some wrong examples with int as return type of ejbCreate. Just saw your SCBCD study guide. Really good work you have got here. Congrats ! Vipin
Joined: Jun 04, 2002
Thanks, Vipin It's not finished yet. Work in progress. Hopefully in 1..2 weeks it will be done.