I am getting ready for the exam and I have a question in regards to the question from HFEJB, chapter�s 6 mock exam, question number 5 that asks:
Which are legal declarations for a CMP bean�s ejbCreate methods? Now it is entity bean we are talking about here.
That method ( ejbCreate() ) under the given circumstances (we are talking Entity beans here) should return the type of primary key. And the spec says
10.6.13 page 197
The primary key type must be a legal Value Type in RMI-IIOP.
So, is this a legal declaration?
public int ejbCreate() throws javax.ejb.CreateException
According to the book, it is not and I cannot figure out what is wrong?
Well, I am aware that most likely, that method needs to have some parameters, but in theory it can be very well without any. Also it does not need to be named �Create<something>, just Create should be OK as well. This in the home interface, of course.
The correct one as per the book is this one:
Public
String ejbCreateAccount() throws javax.ejb.CreateException