I have the following problem:
I have an application with custom security and I need to get all the roles of the caller in my beans (eg. I need construct a SQL query, which would select all documents, to which the current user has access permission).
However, this seems to be impossible according to the EJB specs, because I have only the isCallerInRole method at disposal. There is no getCallerRoles method, which is IMHO a serious absence...
Have you any idea how to overcome that? Hope, there is someone more experienced or perhaps more inventive than I :o) I really don't want to write the authentication and authorization system on my own...
I'm sorry, I found already answer to this question here on the forum (http://main.jboss.org/thread.jsp?forum=49&thread=2953&message=130835).
Anyway, it's still very proprietary solution. I can't understand, why the EJBContext interface doesn't support such method... It seems stupid to me.