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/deployment/task DeployGeronimoMBean.java
Date Tue, 11 Nov 2003 16:38:14 GMT
djencks     2003/11/11 08:38:14

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task
                        DeployGeronimoMBean.java
  Log:
  use GeronimoMBeanInfo directly or a descriptor
  
  Revision  Changes    Path
  1.2       +10 -6     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeployGeronimoMBean.java	11 Nov 2003 04:40:11 -0000	1.1
  +++ DeployGeronimoMBean.java	11 Nov 2003 16:38:14 -0000	1.2
  @@ -118,12 +118,16 @@
                   }
                   GeronimoMBean mbean = (GeronimoMBean) server.instantiate("org.apache.geronimo.kernel.service.GeronimoMBean");
                   mbean.setClassSpace(metadata.getLoaderName());
  -                String descriptorName = metadata.getGeronimoMBeanDescriptor();
  -                URL url = newCL.getResource(descriptorName);
  -                if(url == null) {
  -                    throw new DeploymentException("GeronimoMBean descriptor not found:
" + descriptorName);
  +                GeronimoMBeanInfo geronimoMBeanInfo = metadata.getGeronimoMBeanInfo();
  +                if (geronimoMBeanInfo == null) {
  +                    String descriptorName = metadata.getGeronimoMBeanDescriptor();
  +                    log.info("Looking for descriptor: " + descriptorName);
  +                    URL url = newCL.getResource(descriptorName);
  +                    if(url == null) {
  +                        throw new DeploymentException("GeronimoMBean descriptor not found:
" + descriptorName);
  +                    }
  +                    geronimoMBeanInfo = GeronimoMBeanInfoXMLLoader.loadMBean(url);
                   }
  -                GeronimoMBeanInfo geronimoMBeanInfo = GeronimoMBeanInfoXMLLoader.loadMBean(url);
                   mbean.setMBeanInfo(geronimoMBeanInfo);
                   server.registerMBean(mbean, metadata.getName());
                   registered = true;
  
  
  

Mime
View raw message