I have a requirement that the j2ee roles for any given user may change dynamically in any given user session.
I am using container managed security, buy how do I capture JBosses role checking code to call into my following code?:
getMySessionBean().isUserInRole(java.security.Principal);
public Group[] getRoleSets() { SimpleGroup callerPrincipal = new SimpleGroup("CallerPrincipal"); callerPrincipal.addMember(identity); SimpleGroup s = new SimpleGroup("Roles"); s.addMember(new SimplePrincipal("a.j2ee.role")); s.addMember(new SimplePrincipal("b.j2ee.role")); return new Group[] { s, callerPrincipal}; }