Hi ,
As you know, the real reason of caching is to provide more performance.
So, but what you want, is a API to flush out the old cache.

But you have it,

JaasSecurityManager In JBoss has a flush function by the name of
flushAuthenticationCache
here is a very simple code to use it.

ObjectName jaasMgr = new ObjectName
("jboss.security:service=JaasSecurityManager");
ArrayList list =  MBeanServerFactory.findMBeanServer(null);
if ( list == null )
{
      return;
}
Iterator iter = list.iterator();
while (iter.hasNext())
{
    MBeanServer server = (MBeanServer)(iter.next());
     if ( server.isRegistered(jaasMgr) )
    {
       server.invoke(jaasMgr,"flushAuthenticationCache" ,new String[] {
"your-section-name-from-login-config"  } ,new String[]
{"java.lang.String"});
       break;
    }
}
}

you should only set "your-section-name-from-login-config" .

So, it means, you should call this block after any change in user roles or
.........


Best regards
Mehrdad Ashrafi.





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to