Hello,
I need your help to clear my doubt - should the container discard the instance of
EJB if a business method of that EJB throws an application exception?
It seems that I found two different answers/explanations from two different study resource:
1. From the Whizlab free mock exam question #10:
Which of the following statement is incorrect about the how the exceptions are handled in EJBs?
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 application exceptions to the client.
C. When a business method of an enterprise bean throws an application exception, the container always automatically rolls back the transaction.
D. The class of the exception received by the client is the same the class of the exception when the bean throws an application exception.
Answer: C is the correct answer.
2. From MZ's study notes: (Chapter 12):
it writes only the system exception will cause the container DISCARD the instance.
Can someone clear the cloud for me?
thanks
Helen
SCJP SCWCD
SCDJWS