nerdexam
Oracle

1Z0-860 · Question #298

A developer obtains a Java, security. Principal object by calling the SessionContext.getCallerPrincipal method from within a business method of a session bean. Which statement is true?

The correct answer is C. The return value of Principal. getName depends on the security realm which was used to authenticate. See the full explanation below for the reasoning.

Question

A developer obtains a Java, security. Principal object by calling the SessionContext.getCallerPrincipal method from within a business method of a session bean. Which statement is true?

Options

  • AThe returned Principal object can be null.
  • BThe roles which the Principal is in can be determined from this Principal object.
  • CThe return value of Principal. getName depends on the security realm which was used to authenticate
  • DThe return value of the Principal. getName method is exactly the same as the username used for

How the community answered

(22 responses)
  • A
    14% (3)
  • B
    9% (2)
  • C
    73% (16)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice