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: 8192
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: 15
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: 8192
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.

henrid
Posts: 21
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post by henrid » Thu Feb 14, 2019 8:50 am

I guess it is still not fixed, because I also failed my correct answer.

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

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

Post by admin » Thu Feb 14, 2019 9:13 am

Sorry about that. Definitely fixed now in v 1.83.
If you like our products and services, please help us by posting your review here.

henrid
Posts: 21
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post by henrid » Thu Feb 14, 2019 11:25 am

Thanks. I hope you can re-use questions after 1Z0-895 retires on March 31.

henrid
Posts: 21
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post by henrid » Fri Feb 15, 2019 8:35 pm

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?

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

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

Post by admin » Fri Feb 15, 2019 10:18 pm

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.
If you like our products and services, please help us by posting your review here.

henrid
Posts: 21
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post by henrid » Sat Feb 16, 2019 5:46 am

Thank you!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest