-
1. Re: Database login module and caching
dirk.haase Apr 4, 2002 9:34 AM (in response to pkghosh)Hi,
I have the same problem. Following code should flush the authentication cache. It compiles and runs for me, but the flush wasnt really successfull. I am still hoping to find out how to do this. Maybe someone else can help us out.
String securityDomain = "default"; // this might be wrong.
MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
ObjectName jaasMgr = new ObjectName("Security:name=JaasSecurityManager");
Object[] params = {securityDomain};
String[] signature = {"java.lang.String"};
server.invoke(jaasMgr,"flushAuthenticationCache",params,signature);
Can anyone help on this?
thanks,
Jex
btw: If you wait longer than 30mins after deleting the account, the cache is flushed automatically. That works in my tests.