Page 1 of 1

About question enthuware.oce-ejbd.v6.2.365

Posted: Fri Oct 12, 2012 7:31 am
by Marthin
The question is:

You need to create a stateless session bean that provides implementations for both the methods and allows the remoteMethod() to be accessed only from remote clients and allows the localMethod() to be accessed only from other local beans. Which of the following options will achieve this goal?

The anwser is according to you:
"1. Define a local interface for localMethod and a remote interface for remoteMethod and have the bean implement both the interfaces."

My Question is: Since you can invoke the Remote interface from a local client wouldnt that make this option incorrect and instead the option:
" 4.A single stateless session bean cannot provide such functionality."
This would be the correct one?

Thank you for a great product!
Best Regards
Marthin

Re: About question enthuware.oce-ejbd.v6.2.365

Posted: Sat Oct 13, 2012 5:22 pm
by admin
Actually, when a client accesses a bean from a remote interface, it cannot use that reference to call local interface and it actually acts as a remote client in that case. But you are right that it is still the same local client. The wording of the question has now been changed to "...only clients acting as remote clients..." to avoid this ambiguity.

thank you for your feedback!
Paul.

Re: About question enthuware.oce-ejbd.v6.2.365

Posted: Sun Nov 09, 2014 11:23 am
by ToineS
I still found the wording ambiguous and based on the same reasoning as Marthin had chosen " 4.A single stateless session bean cannot provide such functionality."
I presume it is the 'acting as' bit that makes the question fall in the category 'tough'.. All and all I am getting very frustrated with these exam questions and I am realizing that preparing for this exam doesn't make make understand JEE any better. Its just about knowing all the exam "gothchas" :-(