Hello!
I am having problems after flushing the authentication cache at runtime. I
am using the code which is at the bottom of the email. The flush is done
correctly, although, the user which executes this code looses all its
permissions after this. According to the documentation this code drops all
cached credentials and flushes them to the specified DataSource. How can I
avoid to have the credentials being dropped from memory, or how can I reload
them.
I am using this code only when I update User's data (Roles and/or
Password).
Any help would be welcome.
Thanks in advance,
Victor Batista
java.util.ArrayList servers =
MBeanServerFactory.findMBeanServer(null);
if (servers.size() != 1)
throw new EJBException("Not exactly one server found");
MBeanServer mbeanServer = (MBeanServer) servers.get(0);
String[] params = { "DCSapdbDB" };
String[] signature = { "java.lang.String" };
try {
ObjectName name =
new ObjectName(
"jboss.security",
"service",
"JaasSecurityManager");
mbeanServer.invoke(
name,
"flushAuthenticationCache",
params,
signature);
} catch (Exception e) {
e.printStackTrace();
throw new EJBException(e);
}
-------------------------------------------------------
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