-
1. Re: how to access MBeanServer
adrian.brock Apr 3, 2002 9:36 AM (in response to dirk.haase)MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).iterator().next();
There is only one MBeanServer in JBoss.
Regards,
Adrian -
2. Re: how to access MBeanServer
dirk.haase Apr 4, 2002 6:19 AM (in response to dirk.haase)thanks, that worked. At least it didnt cause any errors. But I still cant seem to flush the cache. Maybe you also have an idea what wrong with this code :
MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).iterator().next();
ObjectName jaasMgr = new ObjectName("Security:name=JaasSecurityManager");
Object[] params = {"java:/jaas/usermgmt-secure"};
String[] signature = {"java.lang.String"};
server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);
log.info("Cache flushed.");
in jboss.xml I have following line
<security-domain>java:/jaas/usermgmt-secure</security-domain>
to set the security domain. Is this the String I need to use as parameter in the invoke statement?
thanks,
Jex -
3. Re: how to access MBeanServer
adrian.brock Apr 4, 2002 7:20 AM (in response to dirk.haase)This is probably a question for the security forum.
Your JMX code looks fine, whether you are passing the
correct value is another question.
NOTE: jboss.xml isn't used here. You are going outside
the container when you access JMX directly.
Regards,
Adrian