Page 1 of 1

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

Posted: Thu Sep 14, 2017 8:09 am
by doriamauro@gmail.com
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

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

Posted: Thu Sep 14, 2017 11:56 am
by admin
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.

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

Posted: Mon Nov 20, 2017 9:04 pm
by brunomg00
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.

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

Posted: Thu Nov 23, 2017 5:50 pm
by dfigueira
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

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

Posted: Thu Nov 23, 2017 10:10 pm
by admin
You are right. Will be fixed asap.
thank you for your feedback!
Paul.

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

Posted: Thu Feb 14, 2019 8:50 am
by henrid
I guess it is still not fixed, because I also failed my correct answer.

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

Posted: Thu Feb 14, 2019 9:13 am
by admin
Sorry about that. Definitely fixed now in v 1.83.

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

Posted: Thu Feb 14, 2019 11:25 am
by henrid
Thanks. I hope you can re-use questions after 1Z0-895 retires on March 31.

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

Posted: Fri Feb 15, 2019 8:35 pm
by henrid
From earlier questions, I learned that an interceptor method MUST have "throws Exception" in the signature.
Now it looks like it is not needed. So please let me know what is the real requirement?

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

Posted: Fri Feb 15, 2019 10:18 pm
by admin
As per the the Interceptor specification the around invoke interceptor method should have "throws Exception" clause but the EJB specification does not explicitly list this as a requirement. It merely states that an interceptor method is allowed to throw exception.

So, in our opinion, both i.e. having a throws clause and not having a throws clause, are valid. We haven't seen any one getting a question that depends on this aspect of an interceptor method. In other words, you will not have to select the correct option based on whether the throws clause is mandatory or not.

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

Posted: Sat Feb 16, 2019 5:46 am
by henrid
Thank you!