Page 1 of 1
About Question enthuware.oce-ejbd.v6.2.580 :
Posted: Fri Jul 05, 2013 8:45 am
by kezman9
I think that explanation of the fourth option is not precise
EJBException is thrown for local clients when the bean method throws a system exception.
As per 14.3.1 table 15 in specification:
If bean method runs in transaction context of client and that method throws system exception javax.ejb.EJBTransactionRolledbackException is thrown to the client.
Please clarify it if I'm wrong
Re: About Question enthuware.oce-ejbd.v6.2.580 :
Posted: Fri Jul 05, 2013 10:14 am
by admin
This exception is thrown for Remote clients, while the explanation is talking about local clients.
http://docs.oracle.com/javaee/6/api/jav ... ption.html
Re: About Question enthuware.oce-ejbd.v6.2.580 :
Posted: Fri Jul 05, 2013 10:44 am
by kezman9
Table 15 from section 14.3.1 says that EJBTransactionRolledbackedException is thrown for:
Handling of Exceptions Thrown by a Business Interface Method or No-interface View Method of a
Bean with Container-Managed Transaction Demarcation
when system exception occurs.
I believe that No-Interface View is specific to local clients.
Re: About Question enthuware.oce-ejbd.v6.2.580 :
Posted: Fri Jul 05, 2013 10:50 am
by admin
It is really weird because there is a TransactionRolledback
LocalException for that purpose.
http://docs.oracle.com/javaee/6/api/jav ... ption.html
In either case, you are right. While EJBException is correct (because both extend from EJBException), it is not precise.
thank you for your feedback!
Re: About Question enthuware.oce-ejbd.v6.2.580 :
Posted: Fri Jul 05, 2013 11:10 am
by kezman9
Yeah, it's a litlle bit confusing
The spec says that javax.ejb.TransactionRolledbackLocalException is thrown for (table 17 in 14.3.2)
Handling of Exceptions Thrown by Methods of Web Service Client View or EJB 2.1 Client View of a Bean with Container-Managed Transaction Demarcation
when system exception occurs. So i believe this is EJB2 specific exception for local clients. Link to javadoc you've giben seems to confirm that (it's available since EJB2.0)
Re: About Question enthuware.oce-ejbd.v6.2.580 :
Posted: Fri May 08, 2015 5:00 pm
by himaiMinh
For option 4's explanation :
EJBException is thrown for local clients when the bean method throws a system exception.
I think with EJB 3 nowadays , EJBException is thrown for both local and remote client when the bean method throws a system exception unless the remote method throws RemoteException.
With EJB 1.0, EJBException was thrown for local client and RemoteException is thrown for remote client.
Re: About Question enthuware.oce-ejbd.v6.2.580 :
Posted: Fri May 08, 2015 7:09 pm
by admin
That is correct. Explanation has been updated to make it clearer.
thank you for your feedback!