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 Sat, 15 Nov 2003 19:42:02 GMT
djencks     2003/11/15 11:42:02

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task
                        DeployGeronimoMBean.java
  Log:
  Initialize attribute values from attribute value map
  
  Revision  Changes    Path
  1.5       +11 -1     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeployGeronimoMBean.java	15 Nov 2003 07:37:37 -0000	1.4
  +++ DeployGeronimoMBean.java	15 Nov 2003 19:42:02 -0000	1.5
  @@ -56,12 +56,16 @@
   package org.apache.geronimo.kernel.deployment.task;
   
   import java.net.URL;
  +import java.util.Iterator;
  +import java.util.Map;
  +
   import javax.management.InstanceNotFoundException;
   import javax.management.MBeanException;
   import javax.management.MBeanRegistrationException;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
   import javax.management.ReflectionException;
  +import javax.management.MBeanAttributeInfo;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -72,6 +76,7 @@
   import org.apache.geronimo.kernel.service.GeronimoMBean;
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfoXMLLoader;
  +import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
   
   /**
    *
  @@ -137,6 +142,11 @@
                           throw new DeploymentException("GeronimoMBean descriptor not found:
" + descriptorName);
                       }
                       geronimoMBeanInfo = GeronimoMBeanInfoXMLLoader.loadMBean(url);
  +                }
  +                Map metadataAttributes = metadata.getAttributeValues();
  +                for (int i = 0; i < geronimoMBeanInfo.getAttributes().length; i++) {
  +                    GeronimoAttributeInfo attributeInfo = (GeronimoAttributeInfo) geronimoMBeanInfo.getAttributes()[i];
  +                    attributeInfo.setInitialValue(metadataAttributes.get(attributeInfo.getName()));
                   }
                   mbean.setMBeanInfo(geronimoMBeanInfo);
                   server.registerMBean(mbean, metadata.getName());
  
  
  

Mime
View raw message