No. Moreover you have to declare each role you want to use in isCallerInRole in the @DeclareRoles annotation. If you use a different one you'll get an error. [ December 17, 2008: Message edited by: Ralph Jaus ]
To my understanding the EJB role model goes in the other direction: First, the bean provider defines appropriate roles for his or her application. Then he or she specifies which role is allowed to use which business methods (@RolesAllowed) or how the business logic depends on the role of the caller (isCallerInRole).
In this point of view there is no need to determine the possible roles in a business method.
But my understanding may be a little bit limited. Interesting topic anyway. [ December 17, 2008: Message edited by: Ralph Jaus ]
SCJP 5 (98%) - SCBCD 5 (98%)
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
SKIP - a book about connecting industrious people with elderly land owners