About Question enthuware.oce-ejbd.v6.2.601 :
Moderators: Site Manager, fjwalraven
About Question enthuware.oce-ejbd.v6.2.601 :
EjbException is not a subclass of of RemoteException, so why is that answer correct??:
Which of the following actions is appropriate when a bean method throws an exception to a remote client?
The client must be prepared to handle EJBException if thrown by the container.
Note: Remote clients get java.rmi.RemoteException if the Business Interface extends java.rmi.Remote.
Which of the following actions is appropriate when a bean method throws an exception to a remote client?
The client must be prepared to handle EJBException if thrown by the container.
Note: Remote clients get java.rmi.RemoteException if the Business Interface extends java.rmi.Remote.
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
The given answer is correct because a business interface does not necessarily have to extend java.rmi.Remote since EJB 3.x. That is why a remote client can get EJBException.
As the explanation says, java.rmi.RemoteException is thrown only if the business interface extends java.rmi.Remote. It is just providing you additional information.
thank you.
As the explanation says, java.rmi.RemoteException is thrown only if the business interface extends java.rmi.Remote. It is just providing you additional information.
thank you.
If you like our products and services, please help us by posting your review here.
Re: About Question enthuware.oce-ejbd.v6.2.601 :
ok thx, then it might be useful to write:
Note: Remote clients get java.rmi.RemoteException ONLY if the Business Interface EXTENDS java.rmi.Remote.
I thought putting the @Remote Annotation is like extending the Remote interface
Note: Remote clients get java.rmi.RemoteException ONLY if the Business Interface EXTENDS java.rmi.Remote.
I thought putting the @Remote Annotation is like extending the Remote interface
-
- Posts: 54
- Joined: Tue Apr 19, 2011 10:32 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
The "None of the above" answer would only be meaningful for questions with only one answer
-
- Posts: 8
- Joined: Thu Sep 25, 2014 2:48 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
Hi,
sorry but about this sentence:
because javax.ejb.EJBException is an unchecked exception and from oracle - java documentation:
http://docs.oracle.com/javase/tutorial/ ... ntime.html
Thank you.
sorry but about this sentence:
I think that must be:The client must be prepared to handle EJBException if thrown by the container.
.The client can be prepared to handle EJBException if thrown by the container.
because javax.ejb.EJBException is an unchecked exception and from oracle - java documentation:
http://docs.oracle.com/javase/tutorial/ ... ntime.html
Even though it is irrelevant on J2EE issues, it is related to java language and in my opinion it should be respected....the API client code cannot reasonably be expected to recover from them or to handle them in any way.
Thank you.
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
You are right. It can be interpreted that way. Fixed.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
-
- Posts: 124
- Joined: Wed Feb 12, 2014 2:44 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
Hello ,
Can you please specify when exactly remote client can receive EJBException ?
I expect remote client to receive remote exception.
Can you please specify when exactly remote client can receive EJBException ?
I expect remote client to receive remote exception.
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
There could be several situations where java.rmi.RemoteException may be received by a client but you need to check the EJB specification to look for such cases (not important for exam) because the specification has moved away from it. In general, a client will receive it, only if the business interface is a remote business interface that extends java.rmi.Remote, which itself is not recommended anymore.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
In the explanation of option 4, "A runtime exception is a system exception and is translated to a RemoteException thrown the client."
I think the remote client won't get RemoteExeption. The client will get EJBException instead.
As the spec 14.3.12 says, RemoteException has been deprecated since EJB 1.1.
I think the remote client won't get RemoteExeption. The client will get EJBException instead.
As the spec 14.3.12 says, RemoteException has been deprecated since EJB 1.1.
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.601 :
You are right. Fixed.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 23 guests