-
1. Re: Flush Authentication Cache don't work
doomsday Nov 26, 2003 10:40 AM (in response to solso)Hi,
I use the following code snippet:
---------- SNIP ---------- SNIP ---------- SNIP ----------
InitialContext ctx = new InitialContext();
RMIAdaptor jbossServer = (RMIAdaptor) ctx.lookup( "jmx/invoker/RMIAdaptor" );
ObjectName jaasSecMgr =
new ObjectName("jboss.security:service=JaasSecurityManager");
// jboss-web.xml: <security-domain>java:/jaas/other</security-domain>
String secDomain = "other";
String method = "flushAuthenticationCache";
Object[] params = { secDomain };
String[] paramTypes = { String.class.getName() };
jbossServer.invoke( jaasSecMgr, method, params, paramTypes);
---------- SNIP ---------- SNIP ---------- SNIP ----------
This works perfectly for me, even fetching the list of cached Principals (method name "getAuthenticationCachePrincipals") and flushing individual Principals ("flushAuthenticationCache" overloaded with additional Principal parameter)
Cheers,
Doomsday -
2. Re: Flush Authentication Cache don't work
doomsday Nov 26, 2003 10:42 AM (in response to solso)Hi again,
forgot to mention that I also use JBoss 3.2.2 with Tomcat and the DatabaseLoginModule.
Cheers,
Doomsday -
3. Re: Flush Authentication Cache don't work
solso Dec 18, 2003 7:35 AM (in response to solso)Hello,
Now it's working.
It was a wrong typed String in the lookup for the securitymanager.
Thanks to all for helping...