geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service GeronimoMBean.java
Date Sun, 28 Dec 2003 19:28:58 GMT
djencks     2003/12/28 11:28:58

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task
                        DeployGeronimoMBean.java
               modules/kernel/src/java/org/apache/geronimo/kernel/service
                        GeronimoMBean.java
  Log:
  Make problems with getGeronimoMBeanInfo methods more visible
  
  Revision  Changes    Path
  1.9       +2 -2      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task/DeployGeronimoMBean.java
  
  Index: DeployGeronimoMBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task/DeployGeronimoMBean.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DeployGeronimoMBean.java	18 Nov 2003 02:19:37 -0000	1.8
  +++ DeployGeronimoMBean.java	28 Dec 2003 19:28:58 -0000	1.9
  @@ -124,7 +124,7 @@
                       try {
                           metadata.setGeronimoMBeanInfo(GeronimoMBean.getGeronimoMBeanInfo(metadata.getGeronimoMBeanDescriptor()));
                       } catch (Exception e) {
  -                        //ignore
  +                        log.trace("Failed to obtain coded GeronimoMBeanInfo", e);
                       }
                   }
                   GeronimoMBean mbean = new GeronimoMBean();
  
  
  
  1.10      +13 -4     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBean.java
  
  Index: GeronimoMBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBean.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- GeronimoMBean.java	17 Nov 2003 07:33:51 -0000	1.9
  +++ GeronimoMBean.java	28 Dec 2003 19:28:58 -0000	1.10
  @@ -112,7 +112,7 @@
           this.mbeanInfo = mbeanInfo;
       }
       /**
  -     * Static helper to try to gett the GeronimoMBeanInfo from the class supplied.
  +     * Static helper to try to get the GeronimoMBeanInfo from the class supplied.
        * @param className
        * @return GeronimoMBeanInfo generated by supplied class
        * @throws Exception
  @@ -122,9 +122,18 @@
           if (cl == null) {
               cl = ClassLoader.getSystemClassLoader();
           }
  -        Class clazz = cl.loadClass(className);
  +        Class clazz = null;
  +        try {
  +            clazz = cl.loadClass(className);
  +        } catch (ClassNotFoundException e) {
  +            //Most likely, descriptor was an xml file, not a class name.
  +            return null;
  +        }
           Method m = clazz.getDeclaredMethod("getGeronimoMBeanInfo", new Class[] {});
  -        return (GeronimoMBeanInfo)m.invoke(clazz, new Object[] {});
  +        if (m != null) {
  +            return (GeronimoMBeanInfo)m.invoke(clazz, new Object[] {});
  +        }
  +        return null;
       }
   
       /**
  
  
  

Mime
View raw message