User: ejort
Date: 02/01/26 13:09:41
Modified: src/main/org/jboss/mx/modelmbean ModelBase.java
Log:
Use the attributes class name not the args class name for setAttribute - needs
optimizing
Revision Changes Path
1.4 +11 -10 jmx/src/main/org/jboss/mx/modelmbean/ModelBase.java
Index: ModelBase.java
===================================================================
RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/modelmbean/ModelBase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ModelBase.java 2002/01/23 22:03:33 1.3
+++ ModelBase.java 2002/01/26 21:09:41 1.4
@@ -49,7 +49,7 @@
* @see org.jboss.mx.modelmbean.ModelMBeanConstants
*
* @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>.
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public abstract class ModelBase
extends MBeanInvoker
@@ -58,7 +58,6 @@
// Attributes ----------------------------------------------------
protected String resourceType = null;
- protected ModelMBeanInfoSupport metadata = null;
protected PersistenceManager persistence = new NullPersistence();
protected NotificationBroadcasterSupport notifier = new
NotificationBroadcasterSupport();
@@ -91,13 +90,13 @@
// ModelMBean implementation -------------------------------------
- public void setModelMBeanInfo(ModelMBeanInfo metadata)
+ public void setModelMBeanInfo(ModelMBeanInfo info)
throws MBeanException, RuntimeOperationsException
{
- if (metadata == null)
+ if (info == null)
throw new IllegalArgumentException("MBeanInfo cannot be null.");
- this.metadata = new ModelMBeanInfoSupport(metadata);
+ this.info = new ModelMBeanInfoSupport(info);
}
public void setManagedResource(Object ref, String resourceType)
@@ -193,23 +192,25 @@
// PersistentMBean implementation --------------------------------
public void load() throws MBeanException, InstanceNotFoundException
{
- if (metadata == null)
+ if (info == null)
return;
- persistence.load(metadata);
+ persistence.load(info);
}
public void store() throws MBeanException, InstanceNotFoundException
{
- persistence.store(metadata);
+ persistence.store(info);
}
// MBeanRegistration implementation ------------------------------
public ObjectName preRegister(MBeanServer server, ObjectName name) throws
Exception
{
//this.descriptors = metadata.getDescriptors(ALL_DESCRIPTORS);
- this.stack = new PersistenceInterceptor(server, this,
metadata.getDescriptors(ALL_DESCRIPTORS));
- this.stack.insertLast(new ModelMBeanInterceptor(resource, metadata));
+ ModelMBeanInfoSupport infoSupport = (ModelMBeanInfoSupport) info;
+ this.stack = new PersistenceInterceptor(server, this,
+ infoSupport.getDescriptors(ALL_DESCRIPTORS));
+ this.stack.insertLast(new ModelMBeanInterceptor(resource, infoSupport));
return name;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development