Java EE 7 Application Developer — Question 14

Which annotation allows a request to be executed with another Principal's identity?

Answer options

Correct answer: C

Explanation

The correct answer is C, @RolesAllowed, which permits access to resources based on the roles assigned to a Principal. Option A is incorrect as it dismisses the possibility entirely, while B, @UseIdentity, and D, @Runs, are not standard annotations used for executing requests with alternate Principal identities.