About Question enthuware.oce-ejbd.v6.2.402 :

Moderator: admin

Post Reply
aazizi.tarik
Posts: 31
Joined: Sun Dec 27, 2015 1:47 pm
Contact:

About Question enthuware.oce-ejbd.v6.2.402 :

Post by aazizi.tarik »

Hi,

I think that the answer of this question is wrong, because a non-asynchronous method can't throw any exception, in opposite of what is explained regarding the second choice. Because we can't throw a java.rmi.RemoteException

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.402 :

Post by admin »

Actually, it can throw any exception. Though RemoteException is generally not recommended to be thrown anymore, there is no technical restriction.
Paul.

aazizi.tarik
Posts: 31
Joined: Sun Dec 27, 2015 1:47 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.402 :

Post by aazizi.tarik »

There one single restriction :)

It's regarding session bean exposing no-interface view, as per section 4.9.8 in the spec:
The throws clause of a bean class method exposed through the no-interface view must not include the java.rmi.RemoteException

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.402 :

Post by admin »

Yes, but the question is not talking about no-interface view. It is clearly says, "...can be exposed in a business interface (remote or local)... "

aazizi.tarik
Posts: 31
Joined: Sun Dec 27, 2015 1:47 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.402 :

Post by aazizi.tarik »

You are right, Thanks Paul

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests