Red Hat Bugzilla – Bug 985400
Example 14.12. Security Annotations Example in Development Guide
Last modified: 2016-04-04 21:13:33 EDT
These mistakes were copied from https://bugzilla.redhat.com/show_bug.cgi?id=957165 because they occure in Development Guide too.
Example 14.12. Security Annotations Example
1) the source code contains additional "public String" above GoodbyeAdmin() method
2) "The GoodBye method runs as the tempemployee role" - this is not true. Establishing a run-as identity for an enterprise bean does not affect the identities of its callers, which are the identities tested for permission to access the methods of the enterprise bean. The run-as identity establishes the identity that the enterprise bean will use when it makes calls. (c.f. http://docs.oracle.com/cd/E19226-01/820-7627/bnbyr/index.html)
I made a stab at this with revision 545453. Darrin, please check my work. It may be that the @runas annotation needs to be explained better throughout.
Verified in Development Guide in Revision 6.3.0-27.