I have been using the Whizlabs exam simulator alongside the Enthuware Exam simulator. Enthuware's question and answers are of a pretty high quality. However the same cannot be said about Whizlabs. I am really considering not using this exam simulator any more as the questions are very vague with very poor English (I am a native speaker).
Has anyone used the Whizlabs and found it useful for the actual exam???
One of the questions from Whizlabs is the following (Question 53 in Exam 2):
Which of the following is incorrect about the how the exceptions are handled in EJB's (1 correct answer)
A. When a business method of an enterprise bean throws an application exception the container discards that instance of the bean
B. Message driven beans are not allowed to throw exceptions to clients
C. When a business method of an enterprise bean throws an application exception, the container automatically rolls back the transaction
D. The class of exception recieved by the client is the same class of exception when the bean throws an application exception
Whizlab answer: C My answer: A and C
A bean is never discarded when an application exception is thrown as the client can try and recover as per section 14.3.1 of the EJB3 core specification. Were the exception changed to a 'system exception' "A" would not be an answer.
Im really sorry.. I wanted to say "Your answer is NOT correct". but by mistake I have missed "NOT".
Mellon Sun is CORRECT. (I double checked )
Here is the summary.
By default App exceptions do not rollback the exceptions (you can override using annotations or ejb-jar). App exceptions are recoverable. So bean instance will not be discarded. To be recoverable, App exps should be propagated to client as it is, not as a wrapped.