commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler ManagedBean.java Registry.java mbeans-descriptors.dtd
Date Tue, 30 Oct 2001 17:19:39 GMT
craigmcc    01/10/30 09:19:39

  Modified:    modeler/src/java/org/apache/commons/modeler ManagedBean.java
                        Registry.java mbeans-descriptors.dtd
  Log:
  Add the ability to optionally specify an MBeanServer domain in which
  object names for these MBeans should be created.
  
  Revision  Changes    Path
  1.4       +19 -4     jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/ManagedBean.java
  
  Index: ManagedBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/ManagedBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ManagedBean.java	2001/10/15 21:14:23	1.3
  +++ ManagedBean.java	2001/10/30 17:19:38	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/ManagedBean.java,v
1.3 2001/10/15 21:14:23 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/10/15 21:14:23 $
  + * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/ManagedBean.java,v
1.4 2001/10/30 17:19:38 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/10/30 17:19:38 $
    *
    * ====================================================================
    *
  @@ -86,7 +86,7 @@
    * descriptor.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/10/15 21:14:23 $
  + * @version $Revision: 1.4 $ $Date: 2001/10/30 17:19:38 $
    */
   
   public class ManagedBean {
  @@ -156,6 +156,21 @@
       public void setDescription(String description) {
           this.description = description;
           this.info = null;
  +    }
  +
  +
  +    /**
  +     * The (optional) <code>ObjectName</code> domain in which this MBean
  +     * should be registered in the MBeanServer.
  +     */
  +    protected String domain = null;
  +
  +    public String getDomain() {
  +        return (this.domain);
  +    }
  +
  +    public void setDomain(String domain) {
  +        this.domain = domain;
       }
   
   
  
  
  
  1.4       +22 -5     jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/Registry.java
  
  Index: Registry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/Registry.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Registry.java	2001/10/15 21:14:23	1.3
  +++ Registry.java	2001/10/30 17:19:38	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/Registry.java,v
1.3 2001/10/15 21:14:23 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/10/15 21:14:23 $
  + * $Header: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/Registry.java,v
1.4 2001/10/30 17:19:38 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/10/30 17:19:38 $
    *
    * ====================================================================
    *
  @@ -86,7 +86,7 @@
    * synchronized.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/10/15 21:14:23 $
  + * @version $Revision: 1.4 $ $Date: 2001/10/30 17:19:38 $
    */
   
   public final class Registry {
  @@ -115,6 +115,23 @@
       private HashMap beans = new HashMap();
   
   
  +    // ------------------------------------------------------------- Properties
  +
  +
  +    /**
  +     * The debugging detail level for our Digester instance.
  +     */
  +    private static int debug = 0;
  +
  +    public static int getDebug() {
  +        return (debug);
  +    }
  +
  +    public static void setDebug(int newDebug) {
  +        debug = newDebug;
  +    }
  +
  +
       // --------------------------------------------------------- Public Methods
   
   
  @@ -252,7 +269,7 @@
           // Create a digester to use for parsing
           Registry registry = getRegistry();
           Digester digester = new Digester();
  -        //        digester.setDebug(1);
  +        digester.setDebug(debug);
           digester.setNamespaceAware(false);
           digester.setValidating(true);
           URL url = registry.getClass().getResource
  
  
  
  1.4       +6 -1      jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/mbeans-descriptors.dtd
  
  Index: mbeans-descriptors.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/modeler/src/java/org/apache/commons/modeler/mbeans-descriptors.dtd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mbeans-descriptors.dtd	2001/10/15 21:14:23	1.3
  +++ mbeans-descriptors.dtd	2001/10/30 17:19:38	1.4
  @@ -11,7 +11,7 @@
         "-//Apache Software Foundation//DTD Model MBeans Configuration File"
         "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
   
  -     $Id: mbeans-descriptors.dtd,v 1.3 2001/10/15 21:14:23 craigmcc Exp $
  +     $Id: mbeans-descriptors.dtd,v 1.4 2001/10/30 17:19:38 craigmcc Exp $
   -->
   
   
  @@ -123,6 +123,10 @@
   
        description      Human-readable description of this managed bean.
   
  +     domain           The JMX MBeanServer domain in which the ModelMBean
  +                      created by this managed bean should be registered,
  +                      when creating its ObjectName.
  +
        group            Optional name of a "grouping classification" that can
                         be used to select groups of similar MBean implementation
                         classes.
  @@ -137,6 +141,7 @@
   <!ATTLIST mbean             id           ID             #IMPLIED>
   <!ATTLIST mbean             className    %ClassName;    #IMPLIED>
   <!ATTLIST mbean             description  CDATA          #IMPLIED>
  +<!ATTLIST mbean             domain       CDATA          #IMPLIED>
   <!ATTLIST mbean             group        CDATA          #IMPLIED>
   <!ATTLIST mbean             name         %MethodName;   #IMPLIED>
   <!ATTLIST mbean             type         %ClassName;    #IMPLIED>
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message