[jboss-cvs] JBossAS SVN: r84039 - trunk/system/src/main/org/jboss/deployers/plugins/managed.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 10 03:25:54 EST 2009
Author: emuckenhuber
Date: 2009-02-10 03:25:54 -0500 (Tue, 10 Feb 2009)
New Revision: 84039
Modified:
trunk/system/src/main/org/jboss/deployers/plugins/managed/BeanMetaDataICF.java
Log:
update name if it's null
Modified: trunk/system/src/main/org/jboss/deployers/plugins/managed/BeanMetaDataICF.java
===================================================================
--- trunk/system/src/main/org/jboss/deployers/plugins/managed/BeanMetaDataICF.java 2009-02-10 08:24:03 UTC (rev 84038)
+++ trunk/system/src/main/org/jboss/deployers/plugins/managed/BeanMetaDataICF.java 2009-02-10 08:25:54 UTC (rev 84039)
@@ -31,6 +31,7 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.logging.Logger;
+import org.jboss.managed.api.Fields;
import org.jboss.managed.api.ManagedProperty;
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ManagementObjectClass;
@@ -143,8 +144,11 @@
// First look to the mapped name
String name = property.getMappedName();
if (name == null)
- property.getName();
- PropertyInfo propertyInfo = beanInfo.getProperty(name);
+ name = property.getName();
+ PropertyInfo propertyInfo = property.getField(Fields.PROPERTY_INFO, PropertyInfo.class);
+ if(propertyInfo == null)
+ propertyInfo = beanInfo.getProperty(name);
+
Object bean = locateBean(attachment.getName());
Object value = null;
MetaValue mvalue = null;
@@ -183,16 +187,19 @@
// First look to the mapped name
String name = property.getMappedName();
if (name == null)
- property.getName();
+ name = property.getName();
try
{
ClassLoader loader = getClassLoader(attachment);
// Set the mbean class loader as the TCL
SecurityActions.setContextClassLoader(loader);
- PropertyInfo propertyInfo = beanInfo.getProperty(name);
+ PropertyInfo propertyInfo = property.getField(Fields.PROPERTY_INFO, PropertyInfo.class);
if(propertyInfo == null)
+ propertyInfo = beanInfo.getProperty(name);
+ if(propertyInfo == null)
throw new IllegalArgumentException("No matching property found: " + name + "/" + beanName);
+
if(propertyInfo.isWritable() == false)
{
if(log.isTraceEnabled())
More information about the jboss-cvs-commits
mailing list