geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task DeployGeronimoMBean.java
Date Tue, 18 Nov 2003 02:19:37 GMT
jboynes     2003/11/17 18:19:37

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task
                        DeployGeronimoMBean.java
  Log:
  Don't overwrite attributes - is this actually valid?
  
  Revision  Changes    Path
  1.8       +5 -5      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DeployGeronimoMBean.java	17 Nov 2003 02:03:17 -0000	1.7
  +++ DeployGeronimoMBean.java	18 Nov 2003 02:19:37 -0000	1.8
  @@ -56,7 +56,6 @@
   package org.apache.geronimo.kernel.deployment.task;
   
   import java.net.URL;
  -import java.util.Iterator;
   import java.util.Map;
   
   import javax.management.InstanceNotFoundException;
  @@ -65,7 +64,6 @@
   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;
  @@ -144,11 +142,13 @@
                   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()));
  +                    if (attributeInfo.getInitialValue() == null) {
  +                        attributeInfo.setInitialValue(metadataAttributes.get(attributeInfo.getName()));
  +                    }
                   }
                   mbean.setMBeanInfo(geronimoMBeanInfo);
                   //If there are constructor args, build the default target ourselves.
  -                if (metadata.getConstructorArgs() != null) {
  +                if (geronimoMBeanInfo.getTarget() == null && metadata.getConstructorArgs()
!= null) {
                       Object target = ParserUtil.instantiate(geronimoMBeanInfo.getTargetClass(),
                           metadata.getConstructorArgs(),
                           metadata.getConstructorTypes(),
  
  
  

Mime
View raw message