Does anyone know how to map Roles stored in a database and retrieved on succesful authentication with roles in declaritive authorization constraints in the web and ejb tier?
Also are there any example out there of how this is achieved?
posted 10 years ago
This is a hard one! I think you'll have to do this programmatically by getting the user name of the database connection you're using, and then querying the database for the Roles granted to that user. For example, on an Oracle database you'd query the USER_ROLES dictionary view. Sorry if this is not much help.