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.
About Question com.enthuware.ets.scbcd.v5.2.39 : Standard Tests #3 question #12
Moderator: admin
-
- Posts: 8
- Joined: Tue Jan 29, 2013 4:14 pm
- Contact:
-
- 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
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.

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.
Who is online
Users browsing this forum: No registered users and 10 guests