User: d_jencks
  Date: 02/02/28 10:00:32

  Modified:    src/main/org/jboss/mx/modelmbean XMBean.java
                        ModelMBeanConstants.java
  Log:
  changed to use new xmbean dtd, and provided User.xml sample generated from xdoclet 
jboss xmbean task (available in xdoclet 1.1.2)
  
  Revision  Changes    Path
  1.6       +18 -0     jmx/src/main/org/jboss/mx/modelmbean/XMBean.java
  
  Index: XMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/modelmbean/XMBean.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMBean.java       26 Feb 2002 02:03:00 -0000      1.5
  +++ XMBean.java       28 Feb 2002 18:00:32 -0000      1.6
  @@ -46,6 +46,24 @@
         super(info);
      }
   
  +   public XMBean(Object resource, URL config) throws MBeanException, 
NotCompliantMBeanException
  +   {
  +      try
  +      {
  +         setManagedResource(resource, config.toString());
  +         info = new ModelMBeanInfoSupport(
  +            (ModelMBeanInfo)new XMLMetaData(resource.getClass().getName(), 
config).build());
  +      }
  +      catch (InstanceNotFoundException e)
  +      {
  +         throw new MBeanException(e);
  +      }
  +      catch (InvalidTargetObjectTypeException e)
  +      {
  +         throw new MBeanException(e, "Unsupported resource type: " + config);
  +      }
  +   }
  +
      public XMBean(Object resource, String resourceType/*, Object resourceInfo*/)
      throws MBeanException, NotCompliantMBeanException
      {
  
  
  
  1.4       +16 -1     jmx/src/main/org/jboss/mx/modelmbean/ModelMBeanConstants.java
  
  Index: ModelMBeanConstants.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jmx/src/main/org/jboss/mx/modelmbean/ModelMBeanConstants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ModelMBeanConstants.java  23 Jan 2002 22:04:23 -0000      1.3
  +++ ModelMBeanConstants.java  28 Feb 2002 18:00:32 -0000      1.4
  @@ -21,11 +21,13 @@
      final static String ROLE                     = "role";
      
      // descriptor types
  -   final static String MBEAN_DESCRIPTOR         = "MBean";
  +   final static String MBEAN_DESCRIPTOR         = "MBean";//should this be mbean? 
as in XMLMetaData
      final static String ATTRIBUTE_DESCRIPTOR     = "attribute";
      final static String OPERATION_DESCRIPTOR     = "operation";
      final static String NOTIFICATION_DESCRIPTOR  = "notification";
      final static String CONSTRUCTOR_DESCRIPTOR   = "constructor";
  +   //not so sure about this guy
  +   final static String DESCRIPTOR = "descriptor";
      
      final static String ALL_DESCRIPTORS          = null;
      
  @@ -60,11 +62,24 @@
      final static String NO_MORE_OFTEN_THAN       = "NoMoreOftenThan";
      final static String NEVER                    = "Never";
      final static String ON_TIMER                 = "OnTimer";
  +   final static String[] PERSIST_POLICY_LIST = {NEVER, ON_UPDATE, 
NO_MORE_OFTEN_THAN, ON_TIMER};
            
      // Constants for metadata objects
      final static boolean IS_READABLE             = true;
      final static boolean IS_WRITABLE             = true;
      final static boolean IS_IS                   = true;
   
  +
  +   //impact
  +   final static String ACTION = "ACTION";
  +   final static String ACTION_INFO = "ACTION_INFO";
  +   final static String INFO = "INFO";
  +
  +   //these are jboss specific.
  +   final static String STATE_ACTION_ON_UPDATE = "state-action-on-update";
  +   final static String KEEP_RUNNING = "KEEP_RUNNING";
  +   final static String RESTART = "RESTART";
  +   final static String REINSTANTIATE = "REINSTANTIATE";
  +   final static String[] STATE_ACTION_ON_UPDATE_LIST = {KEEP_RUNNING, RESTART, 
REINSTANTIATE};
   }
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to