About Question enthuware.oce-jpad.v6.2.394 :
Posted: Tue Sep 01, 2015 4:42 pm
Hi,
The correct answer is:
The bean A instance will be discarded if there is no exception handling code for call to mB().
The explanation is next:
Because the call to mB will throw a javax.ejb.TransactionRequiredLocalException, which extends from EJBException and thus is a system exception. If there is no exception handling for this call, the exception will propagate out of the Bean A instance, which will cause the Bean A instance to be discarded.
As I know if a bean receives RuntimeException(without @application exception) the transaction would be always rolled back (if active) and the bean itself should be discarded.
First time hear that such exceptions could be handled and bean would not be discarded.
Please check.
The correct answer is:
The bean A instance will be discarded if there is no exception handling code for call to mB().
The explanation is next:
Because the call to mB will throw a javax.ejb.TransactionRequiredLocalException, which extends from EJBException and thus is a system exception. If there is no exception handling for this call, the exception will propagate out of the Bean A instance, which will cause the Bean A instance to be discarded.
As I know if a bean receives RuntimeException(without @application exception) the transaction would be always rolled back (if active) and the bean itself should be discarded.
First time hear that such exceptions could be handled and bean would not be discarded.
Please check.