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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
goetz

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

Post by goetz »

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!

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

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

Post by admin »

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.

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven »

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.
I agree, but I would say that the better answer is:
"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

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

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

Post by admin »

fjwalraven wrote:
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.
I agree, but I would say that the better answer is:
"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
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.

thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests