About Question com.enthuware.ets.scbcd.v5.2.39 : Standard Tests #3 question #12

Moderator: admin

Post Reply
cjscript
Posts: 8
Joined: Tue Jan 29, 2013 4:14 pm
Contact:

About Question com.enthuware.ets.scbcd.v5.2.39 : Standard Tests #3 question #12

Post by cjscript »

Typo in question Explanation:

"For example, getCallerPrincipal() or isCallerInRole() cannot be called by an MDB."

Should be

"For example, isCallerInRole() cannot be called by an MDB."

MDBs can call getCallerPrincipal() although the return value isn't useful.

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

Re: About Question com.enthuware.ets.scbcd.v5.2.39 : Standard Tests #3 question #12

Post by admin »

Well, "cannot" can be interpreted in multiple ways. For example, you cannot call System.exit() in a bean. Of course, you can write the code to call it but it is not permitted. Or an extreme case may be something like you cannot write xyz code (code that doesn't compile). But then you say, of course, you can write it. It's not like the keyboard will stop working :)

So the point is you do something with a purpose. Here, the purpose is the get the Caller's principal. So can you write the code that calls, getCallerPrincipal? Of course, you can. But the value wouldn't be useful. You can't really answer a question in the exam using this kind of interpretation.

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests