-
1. Re: How to logout? I can't make it work by reading previous
tool Sep 23, 2002 2:18 PM (in response to gifkins)hey,
i don't know about 2.4.6, but this code works for 3.0.x when you have the jmx-rmi-adaptor.jar in the server/default/lib directory and put it right after the session.invalidate()...
InitialContext iContext = new InitialContext();
String serverName = serverName = java.net.InetAddress.getLocalHost().getHostName();
RMIAdaptor server = (org.jboss.jmx.adaptor.rmi.RMIAdaptor)iContext.lookup("jmx:" + serverName + ":rmi");
ObjectName jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager");
Object[] params = {"TestDomain"};
String[] signature = {"java.lang.String"};
server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);
System.out.println("[Logoff Action] Auth Cache Flushed");
maybe it will steer you in the right direction though...
good luck,
tool