Hi there,
Consider this HF final mock exam questions.
1)
Q 32 / 646
Can MDB have overloaded ejbCreate methods?
Ans :: No , MDB have no clients.
Concern: I actully deployeed MDB with multiple ejbCreate(). So I think
you can have them , but no arg ejbCreate must be there.
( I used
j2ee ri)
2)
Q 57
What's true about entity bean's identity?
Option: If 2 entity objects references are compaired using idIdentical,
the container will return T if 2 entity objects have same PK.
Ans:: T
Concern::
Please consider this scenario
UserHome uh= (UserHome)......
User u=uh.findByPrimaryKey("100");
// User entity uses
String as Primary key class.
// already has entry with it.
AccountHome ah=(AccountHome).....
Account a=ah.findByPrimaryKey("100");
// Account entity also uses String as PK class
// Now...
String userPk=(String) u.getPrimaryKey();
String accPk(String)a.getPrimaryKey();
sop( userPk.equals(accPk) ); // should say Yeah
sop( u.isIdentical(a) ) ; // should say No...different Home
Now considering this cases, if isIdentical raises exception,
HF is right, but if it doesnt , wording or question should include
something about same/diff home.
What do you think?
3)
Q 65
In which cases session bean instance gets descarded without calling
ejbRemove();
c) An inactive client is timed out while bean in passive state.
Now, passivation doesnt apply to stateless, but since Q. is talkin about
session (by which ideally they would be wanting us to consider both types of beans and answer), do you think we should select this option?
Hey guys what do you say real exam too is somehow abstract in
wording of ques?
Your suggestions and corrections in my views are appreciated!!!
Amol.