Hi,
there is the following mock-question in the book from Paul Sanghera on page 121:
In which of the following cases will the container remove a session bean instance without invoking the ejbRemove() method?
a) The bean instance throws a system exception.
b) The bean instance in a passive state times out.
c) The bean instance in the method ready state times out.
d) The bean instance calls a prohibited method of its session context.
e) The client invokes the method remove().
Pauls answer: A, B
But why is option d) wrong? When a bean instance calls a prohibited method of its session context, an
IllegalStateException will be thrown. This is a RuntimeException. A RuntimeException is a system exception, and when the bean instance throws a system exception, the container will remove the bean instance without invoking the ejbRemove() method.
Is my conclusion true or false?
Regards,
Oliver