Page 1 of 1

Re: About Question enthuware.oce-jpad.v6.2.405 :

Posted: Sat Apr 23, 2016 11:57 am
by lveto15
Have problem with this question. Selected answer is correct according to specification per se (in abstract situation).

In this case, question mentions that
system exceptions are not caught anywhere in the code
, thus exception recieves in bean A is propagated to client, which doesn't catch it. So, client is interrupted and its transation is not finished correctly. Client could continue but didn't use this option, so better answer is "None of the above".

Re: About Question enthuware.oce-jpad.v6.2.405 :

Posted: Sun Apr 24, 2016 9:04 pm
by admin
The client can have a finally or even a shutdown hook that can commit the transaction. Therefore, even if the client doesn't catch the exception, it still can continue with that transaction.

The point here is that on the client side, its transaction is not doomed.

HTH,
Paul.

Re: About Question enthuware.oce-jpad.v6.2.405 :

Posted: Sat Sep 22, 2018 10:30 pm
by __JJ__
There is no impact on bean B instance.
Why is this? Is it because the bean B method in some way "never got going"? I thought when a method was called on a session bean and it blows up (i.e the exception isn't handled and propagates to the caller, which in this case is bean A) it gets destroyed, simple as that. I haven't studied EJB (yet), seeing as it's a different exam, so please could you elaborate a little on why bean B doesn't get destroyed, when in so many other questions of type "client calls bean A, bean A calls bean B, bean B throws some kind of exception" bean B gets destroyed.

Thanks.

Re: About Question enthuware.oce-jpad.v6.2.405 :

Posted: Sat Sep 22, 2018 11:34 pm
by admin
Correct. Bean B was never invoked. It never threw an exception to the container. The container threw an exception to A on its own.

Re: About Question enthuware.oce-jpad.v6.2.405 :

Posted: Sun Sep 23, 2018 11:34 am
by __JJ__
OK I see, thanks very much.