| Author |
Doubts on answers for Q 5,Q15 in Chapter 6
|
muthu kumaran
Ranch Hand
Joined: Oct 26, 2004
Posts: 56
|
|
Hi, I am not sure about the correct answers for Q5 and Q15 on chapter 6 of HFEJB Q5) What are legal declarations for a CMP bean The option B is right , but what is wrong with Option D public int ejbCreate() throws CreateException Q15) Which methods are always called in direct response to a client operation? The options B) ejbCreate C) ejbRemove have been marked right But option D) ejbActivate is left out. why is it so? ejbActivate is called only on response to a client invoking some method and not by the container whenever it wants to .. Can anyone throw some light on this? Thanks, Muthu
|
 |
Herman Schelti
Ranch Hand
Joined: Jul 17, 2006
Posts: 387
|
|
hi Muthu, Q5 answer D is not correct, because this method has to retunr the primary and the primary key has to be a class, not just a primitive. Integer instead of int would have been OK. Q15 answer D is not correct, because the client cannot call the ejbActivate() method on the bean. Hope this helps, Herman
|
 |
muthu kumaran
Ranch Hand
Joined: Oct 26, 2004
Posts: 56
|
|
Thanks Herman for the response. I am clear with the first one, but not clear with the second one. ejbActivate will not be called by the client directly as is the case with ejbCreate too. The question was which methods wud be called on direct response to a client's action and 'ejbActivate' also fits that role.. Thanks, Muthu
|
 |
 |
|
|
subject: Doubts on answers for Q 5,Q15 in Chapter 6
|
|
|