Page 1 of 1

About Question enthuware.oce-jpad.v6.2.403 :

Posted: Mon Sep 17, 2018 12:34 am
by __JJ__
Hi

I struggled with this because in the API for EJBTransactionRolledbackException at https://docs.oracle.com/javaee/7/api/ja ... ption.html

it says
This exception is thrown to a remote client
but one of the correct answers is:
The client may have called the method through the bean's remote or local interface.
I don't know an awful lot about EJB, but to my inexperienced mind it seems like there is a contradiction here. Am I misunderstanding the meaning of remote client vs remote/local interface? Does the word remote mean something different in each case?

Thanks very much.

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

Posted: Mon Sep 17, 2018 1:14 am
by admin
Section 14.3.7 of EJB 3.1 spec says (just before the start of section 14.3.8),
If the instance executed in the client’s transaction, the container should throw the javax.ejb.EJBTransactionRolledbackException [79]
and in footnote 79, it says,
If the business interface is a remote business interface that extends java.rmi.Remote, the javax.transaction.TransactionRolledbackException is thrown to the client instead.
The above statements imply that if the business interface doesn't extend java.rmi.Remote, this exception can be thrown to the local client as well.

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

Posted: Sun Sep 23, 2018 9:07 pm
by __JJ__
OK I see, thank you.