dynamic roles on a Java EE server
问题 I want to manage user and roles in a dedicated application. For example a user of this application ("customerX boss") can create a new role "customerX employee". If an employee accesses the Java EE application server (GlassFish 3) he should get the role "customerX employee". It sounds simple, but it is not supported by Java EE, because groups are mapped to roles at start-up time and the roles within the application are static. What is the best way to manage user roles at runtime in a Java EE