tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin TomcatTreeBuilder.java
Date Fri, 03 Oct 2003 21:23:34 GMT
amyroh      2003/10/03 14:23:34

  Modified:    webapps/admin/WEB-INF/classes/org/apache/webapp/admin
                        TomcatTreeBuilder.java
  Log:
  Fix the way it was querying JAASRealm.
  
  Revision  Changes    Path
  1.9       +11 -8     jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java
  
  Index: TomcatTreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TomcatTreeBuilder.java	23 Sep 2003 19:29:36 -0000	1.8
  +++ TomcatTreeBuilder.java	3 Oct 2003 21:23:34 -0000	1.9
  @@ -80,6 +80,7 @@
   import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.util.MessageResources;
  +import javax.management.AttributeNotFoundException;
   import javax.management.MalformedObjectNameException;
   import javax.management.MBeanServer;
   import javax.management.MBeanServerFactory;
  @@ -436,9 +437,11 @@
               Lists.getRealms(mBServer, containerName).iterator();
           while (realmNames.hasNext()) {
               String realmName = (String) realmNames.next();
  -	    ManagedBean mb = Registry.getRegistry().findManagedBean(realmName);
  -	    if (mb!=null && !mb.getName().equals("JAASRealm")) {
  -	        ObjectName objectName = new ObjectName(realmName);
  +	    ObjectName objectName = new ObjectName(realmName);
  +            // Create tree nodes for non JAASRealm only
  +            try {
  +                mBServer.getAttribute(objectName, "validate");
  +            } catch (AttributeNotFoundException e) {
   	        String nodeLabel = "Realm for " + containerNode.getLabel();
   	        TreeControlNode realmNode =
   		    new TreeControlNode(realmName,
  @@ -451,7 +454,7 @@
                                       "content",
                                       false, domain);
                   containerNode.addChild(realmNode);
  -	    }
  +            }
           }
           
       }   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message