tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jean charles jabouille" <>
Subject JNDIrealm Mbean
Date Fri, 11 Mar 2005 09:48:24 GMT

I use Tomcat 5.5 and I created a JNDIRealm in the server.xml file. I d'like to accede to the
JNDIMean mbean but I can't find informations about source code exemple. I saw this page that
contains all Tomcat Mbean

Is there a mbean-descriptor.xml to add to my application ? I do think because I think that
Tomcat Mbean are loaded automatically.

Here is an exemple of my tentative to access to the Tomcat JNDIRealm mbean and to access to
the connectionUrl of my realm. This code is not working :-(

try {
  ObjectName timer = new ObjectName("Catalina:type=org.apache.catalina.realm.JNDIRealm,name=JNDIRealm");
     List list = MBeanServerFactory.findMBeanServer(null);
     MBeanServer server = (MBeanServer) list.iterator().next();
String connectionUrl;     
connectionUrl=(String)server.invoke(timer,"connectionURL",new Object[] {  },new String[] {
     catch(Exception e){

Do you have an code exemple or a solution ?

Thanks for your answers,

Jabouille Jean Charles

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message