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

Moderator: admin

Post Reply
doriamauro@gmail.com
Posts: 3
Joined: Wed May 03, 2017 8:14 am
Contact:

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

Post by doriamauro@gmail.com » Thu Sep 14, 2017 8:09 am

hello,
about this point of explenation:

2. Ideally,  an interceptor method should have a throws Exception clause but not having it is also ok. This is based on the logic of overriding a method.


I don't see any superclass and then any overriding logic.

thanks in advanced

Mauro

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

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

Post by admin » Thu Sep 14, 2017 11:56 am

Yes, I am not sure what that statement means.

The specification allows an interceptor method to have a throws clause. Business method interceptor methods may throw runtime exceptions or application exceptions that are allowed in the throws clause of the business method. But the method can choose not to have it.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.

brunomg00
Posts: 3
Joined: Mon Nov 20, 2017 8:41 pm
Contact:

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

Post by brunomg00 » Mon Nov 20, 2017 9:04 pm

According to the question of the following link: viewtopic.php?f=4&t=2161, I believe that description is wrong.
Since it seems to be that an Interceptor for a business method must declare throws Exception, it is not ok to not declare it as stated by the explanation.
That said, I believe that the correct answer would be:
The interceptor class will fail to deploy.
Thanks in advance.

dfigueira
Posts: 11
Joined: Thu May 05, 2016 2:50 am
Contact:

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

Post by dfigueira » Thu Nov 23, 2017 5:50 pm

I failed this question choosing the option "The bean class will fail to deploy."

Because the question's code has:

Code: Select all

Bean code:// 
Stateless 
@Interceptors ({MyAroundInterceptor.class} )
@ is missing before Stateless... Please fix the code in this question.

Tks

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

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

Post by admin » Thu Nov 23, 2017 10:10 pm

You are right. Will be fixed asap.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests