This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes run-as Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "run-as" Watch "run-as" New topic
Author

run-as

Nikita Deshmukh
Ranch Hand

Joined: Jun 08, 2005
Posts: 38
Hi all,

This is really confusing. Ih ave been going thru the specs and I really don't know what to think. Now here's the question :

Given the session bean with a run-as identity, What is returned from getCallerPrincipal when invoked from the bean's business method ??

A. the run-as identity.
B. the principal associated with the client invocation.

Now the answer states A as the correct option. But the ejb-2.0 specs on the page number 437 clearly state that

"Note that getCallerPrincipal() returns the principal that represents the caller of the enterprise bean, not the principal that corresponds to the run-as security identity for the bean, if any."

Which one is correct.

Thanks,
Nikita.
chao cai
Ranch Hand

Joined: May 26, 2005
Posts: 154
I agree with you the anwser is B


SCEA<br />SCJP 1.2<br />SCBCD<br />MCSD<br />IBM Certified Specialist RUP v2003<br />IBM Certified Solution Designer OOAD vUML2<br /> <br />Phone Number:86-010-82776427
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: run-as
 
Similar Threads
getCallerPrincipal()
run-as related question
Security - Principal & run-as-identity
Doubt with EJB Programmatic Security
caller principal question from spec