About Question enthuware.oce-ejbd.v6.2.522 :
Moderators: Site Manager, fjwalraven
Re: About Question enthuware.oce-ejbd.v6.2.522 :
What happens if only one of the two public methods is annotated with @WebMethod? In that case do both methods get exposed or just the one? Also, I couldn't find references to this in the spec; what should I assume as far as the exam is concerned? Thanks!
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.522 :
If two methods are annotated with @WebMethod, only those two will be exposed, rest will not be exposed. If you do not have method annotated with @WebMethod, all the public methods will be exposed.
Some candidates have reported getting very basic questions on this topic. So you should at least familiarize yourself with this topic. If you understand the 3 questions that are there in the simulator ( 2.529, 2.526, and 2.522) referring to web services, you should be ok.
HTH,
Paul.
Some candidates have reported getting very basic questions on this topic. So you should at least familiarize yourself with this topic. If you understand the 3 questions that are there in the simulator ( 2.529, 2.526, and 2.522) referring to web services, you should be ok.
HTH,
Paul.
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.522 :
I agree, but I would say that the better answer is:If two methods are annotated with @WebMethod, only those two will be exposed, rest will not be exposed. If you do not have method annotated with @WebMethod, all the public methods will be exposed.
"The methods declared in TellerRemote interface plus all other public methods declared in TellerBean"
Because the bean has to implement all the methods from the interface. That means that all methods (with an @Override) will be in this TellerBean, and they will all be declared public. Apart from the methods defined in the interface the other public methods will be exposed as well.
Although "valid code, not relevant to the question." is on top of the code, one might think that there is another public method somewhere at the end of the code as it simply states " ... rest of the code"
Regards,
Frits
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.522 :
I see your point. "plus the methods in TellerRemote interface" has been added to the correct option. "Rest of the code" has also been removed to avoid any confusion.fjwalraven wrote:I agree, but I would say that the better answer is:If two methods are annotated with @WebMethod, only those two will be exposed, rest will not be exposed. If you do not have method annotated with @WebMethod, all the public methods will be exposed.
"The methods declared in TellerRemote interface plus all other public methods declared in TellerBean"
Because the bean has to implement all the methods from the interface. That means that all methods (with an @Override) will be in this TellerBean, and they will all be declared public. Apart from the methods defined in the interface the other public methods will be exposed as well.
Although "valid code, not relevant to the question." is on top of the code, one might think that there is another public method somewhere at the end of the code as it simply states " ... rest of the code"
Regards,
Frits
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 13 guests