Please go through the following question from one of the mock exams.
Q) A typical use of ejbHome and ejbSelect method would be? Select 2 Answers A. use ejbSelect methods within ejbHome methods to return entities B. use ejbSelect methods to access fields of a bean instance C. use ejbHome methods to perform operation not specific to a entity instance D. Use ejbHome methods to initialize entity bean instance variables
The Ans: given are B and C
I feel that A, C are correct.
Can any one please explain why option B is correct? Thanks in Advance.
B. use ejbSelect methods to access fields of a bean instance
Looking at the option, it is not clear if it is referring to cmp fields or static final fields. Anyway, ejbSelect method can still access cmp fields, when called from business methods that are defined in component interface.
But I feel that option A is also correct A. use ejbSelect methods within ejbHome methods to return entities We can use ejbSelect methods within ejbHome methods right.
Actually I have use ejbSelect<method> within an ejbHome<method> I think this is not clear.
see example :
public Collection ejbHomeListAllUserWithActiveCart()throws FinderException{ Collection list = null; list = ejbSelectAllUserWithActiveCart(); return list; }
wawi
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad: