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/modeler/src/test/org/apache/commons/modeler RegistryTestCase.java mbeans-descriptors.xml
Date Thu, 23 Jan 2003 19:42:10 GMT
craigmcc    2003/01/23 11:42:09

  Modified:    modeler/src/java/org/apache/commons/modeler
                        AttributeInfo.java BaseModelMBean.java
                        ConstructorInfo.java FeatureInfo.java
                        ManagedBean.java Registry.java
                        mbeans-descriptors.dtd
               modeler/src/java/org/apache/commons/modeler/modules
                        MbeansDescriptorsDOMSource.java
                        MbeansDescriptorsDigesterSource.java
               modeler/src/java/org/apache/commons/modeler/util
                        IntrospectionUtils.java
               modeler/src/test/org/apache/commons/modeler
                        RegistryTestCase.java mbeans-descriptors.xml
  Added:       modeler/src/java/org/apache/commons/modeler FieldInfo.java
  Log:
  As earlier proposed, add the ability to configure name/value pairs that
  will appear in the javax.management.Descriptor objects of the metadata
  that is associated with an MBean.  This allows for extensibility without
  requiring changes to the DTD to accomodate application-specific attributes.
  Modified both the DOM and Digester source readers to process this, and
  added some initial unit tests to validate.
  
  The new thing is a <descriptor> element that can contain zero or more
  <field> elements.  A <descriptor> can be nested inside an <mbean>, an
  <attribute>, a <constructor>, a <notification>, or an <operation> element
  to add name/value pairs.  See the DTD for details.
  
  Also did some copyright date cleanup along the way.
  
  Revision  Changes    Path
  1.4       +6 -5      jakarta-commons/modeler/src/java/org/apache/commons/modeler/AttributeInfo.java
  
  Index: AttributeInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/AttributeInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AttributeInfo.java	7 Jan 2003 06:39:36 -0000	1.3
  +++ AttributeInfo.java	23 Jan 2003 19:42:03 -0000	1.4
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -273,6 +273,7 @@
                   descriptor.setField("setMethod",
                                       getMethodName(getName(), false, false));
           }
  +        addFields(descriptor);
           info.setDescriptor(descriptor);
           return (info);
   
  
  
  
  1.13      +5 -5      jakarta-commons/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java
  
  Index: BaseModelMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BaseModelMBean.java	21 Jan 2003 00:33:45 -0000	1.12
  +++ BaseModelMBean.java	23 Jan 2003 19:42:04 -0000	1.13
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.3       +5 -5      jakarta-commons/modeler/src/java/org/apache/commons/modeler/ConstructorInfo.java
  
  Index: ConstructorInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/ConstructorInfo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConstructorInfo.java	7 Jan 2003 06:39:36 -0000	1.2
  +++ ConstructorInfo.java	23 Jan 2003 19:42:04 -0000	1.3
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.3       +49 -5     jakarta-commons/modeler/src/java/org/apache/commons/modeler/FeatureInfo.java
  
  Index: FeatureInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/FeatureInfo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FeatureInfo.java	7 Jan 2003 06:39:36 -0000	1.2
  +++ FeatureInfo.java	23 Jan 2003 19:42:04 -0000	1.3
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -64,7 +64,12 @@
   
   package org.apache.commons.modeler;
   
  +
   import java.io.Serializable;
  +import java.util.ArrayList;
  +import java.util.Iterator;
  +import java.util.List;
  +import javax.management.Descriptor;
   
   
   /**
  @@ -80,6 +85,7 @@
   public class FeatureInfo implements Serializable {
   
       protected String description = null;
  +    protected List fields = new ArrayList();
       protected String name = null;
   
       // ------------------------------------------------------------- Properties
  @@ -98,6 +104,14 @@
   
   
       /**
  +     * The field information for this feature.
  +     */
  +    public List getFields() {
  +        return (fields);
  +    }
  +
  +
  +    /**
        * The name of this feature, which must be unique among features in the
        * same collection.
        */
  @@ -112,6 +126,36 @@
   
       // --------------------------------------------------------- Public Methods
   
  +
  +    /**
  +     * <p>Add a new field to the fields associated with the
  +     * Descriptor that will be created from this metadata.</p>
  +     *
  +     * @param field The field to be added
  +     */
  +    public void addField(FieldInfo field) {
  +        fields.add(field);
  +    }
  +
  +
  +    // ------------------------------------------------------ Protected Methods
  +
  +
  +    /**
  +     * <p>Add the name/value fields that have been stored into the
  +     * specified <code>Descriptor</code> instance.</p>
  +     *
  +     * @param descriptor The <code>Descriptor</code> to add fields to
  +     */
  +    protected void addFields(Descriptor descriptor) {
  +
  +        Iterator items = getFields().iterator();
  +        while (items.hasNext()) {
  +            FieldInfo item = (FieldInfo) items.next();
  +            descriptor.setField(item.getName(), item.getValue());
  +        }
  +
  +    }
   
   
   }
  
  
  
  1.5       +42 -5     jakarta-commons/modeler/src/java/org/apache/commons/modeler/ManagedBean.java
  
  Index: ManagedBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/ManagedBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ManagedBean.java	7 Jan 2003 06:39:36 -0000	1.4
  +++ ManagedBean.java	23 Jan 2003 19:42:04 -0000	1.5
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -66,6 +66,10 @@
   
   
   import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.List;
  +import java.util.Map;
   import javax.management.*;
   import javax.management.modelmbean.InvalidTargetObjectTypeException;
   import javax.management.modelmbean.ModelMBean;
  @@ -104,6 +108,7 @@
       protected String group = null;
       protected String name = null;
   
  +    protected List fields = new ArrayList();
       protected NotificationInfo notifications[] = new NotificationInfo[0];
       protected OperationInfo operations[] = new OperationInfo[0];
       protected String type = null;
  @@ -170,6 +175,16 @@
   
   
       /**
  +     * <p>Return a <code>List</code> of the {@link FieldInfo} objects for
  +     * the name/value pairs that should be
  +     * added to the Descriptor created from this metadata.</p>
  +     */
  +    public List getFields() {
  +        return (this.fields);
  +    }
  +
  +
  +    /**
        * The (optional) group to which this MBean belongs.
        */
       public String getGroup() {
  @@ -268,6 +283,17 @@
   
   
       /**
  +     * <p>Add a new field to the fields associated with the
  +     * Descriptor that will be created from this metadata.</p>
  +     *
  +     * @param field The field to be added
  +     */
  +    public void addField(FieldInfo field) {
  +        fields.add(field);
  +    }
  +
  +
  +    /**
        * Add a new notification to the set of notifications for this MBean.
        *
        * @param notification The new notification descriptor
  @@ -456,6 +482,17 @@
           info = new ModelMBeanInfoSupport
               (getClassName(), getDescription(),
                attributes, constructors, operations, notifications);
  +        try {
  +            Descriptor descriptor = info.getMBeanDescriptor();
  +            Iterator fields = getFields().iterator();
  +            while (fields.hasNext()) {
  +                FieldInfo field = (FieldInfo) fields.next();
  +                descriptor.setField(field.getName(), field.getValue());
  +            }
  +        } catch (MBeanException e) {
  +            ;
  +        }
  +
           return (info);
   
       }
  
  
  
  1.16      +1 -1      jakarta-commons/modeler/src/java/org/apache/commons/modeler/Registry.java
  
  Index: Registry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/Registry.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Registry.java	21 Jan 2003 00:33:45 -0000	1.15
  +++ Registry.java	23 Jan 2003 19:42:04 -0000	1.16
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.2       +30 -6     jakarta-commons/modeler/src/java/org/apache/commons/modeler/mbeans-descriptors.dtd
  
  Index: mbeans-descriptors.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/mbeans-descriptors.dtd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mbeans-descriptors.dtd	30 Apr 2002 20:58:52 -0000	1.1
  +++ mbeans-descriptors.dtd	23 Jan 2003 19:42:05 -0000	1.2
  @@ -84,7 +84,7 @@
                         attribute is writeable by management applications.
                         By default, this is set to "true".
   -->
  -<!ELEMENT attribute EMPTY>
  +<!ELEMENT attribute (descriptor?)>
   <!ATTLIST attribute         id           ID             #IMPLIED>
   <!ATTLIST attribute         description  CDATA          #IMPLIED>
   <!ATTLIST attribute         displayName  CDATA          #IMPLIED>
  @@ -107,12 +107,36 @@
        name             Name of this constructor (by Java convention, this must
                         be the same as the base class name).
   -->
  -<!ELEMENT constructor (parameter*)>
  +<!ELEMENT constructor (descriptor?, parameter*)>
   <!ATTLIST constructor       id           ID             #IMPLIED>
   <!ATTLIST constructor       displayName  CDATA          #IMPLIED>
   <!ATTLIST constructor       name         %VariableName; #IMPLIED>
   
   
  +<!-- The "descriptor" element groups a set of descriptor fields whose
  +     values will be included in the Descriptor for the corresponding
  +     metatdata info classes.
  +-->
  +<!ELEMENT descriptor (field*)>
  +<!ATTLIST descriptor        id           ID             #IMPLIED>
  +
  +
  +<!-- The "field" element represents a single name/value pair that will
  +     be included in the Descriptor corresponding to our enclosing
  +     "descriptor" element.  The following attributes are supported:
  +
  +     name             Field name of the field to be included
  +
  +     value            Field value of the field to be included
  +                      (will be stored as a String)
  +-->
  +<!ELEMENT field EMPTY>
  +<!ATTLIST field             id           ID             #IMPLIED>
  +<!ATTLIST field             name         CDATA          #REQUIRED>
  +<!ATTLIST field             value        CDATA          #REQUIRED>
  +
  +
  +
   <!-- The "mbean" element describes a particular JMX ModelMBean implementation,
        including the information necessary to construct the corresponding
        ModelMBeanInfo structures.  The following attributes are supported:
  @@ -137,7 +161,7 @@
        type             Fully qualified Java class name of the underlying
                         managed resource implementation class.
   -->
  -<!ELEMENT mbean (attribute*, constructor*, notification*, operation*)>
  +<!ELEMENT mbean (descriptor?, attribute*, constructor*, notification*, operation*)>
   <!ATTLIST mbean             id           ID             #IMPLIED>
   <!ATTLIST mbean             className    %ClassName;    #IMPLIED>
   <!ATTLIST mbean             description  CDATA          #IMPLIED>
  @@ -155,7 +179,7 @@
   
        name             Name of this set of notification event types.
   -->
  -<!ELEMENT notification (notification-type*)>
  +<!ELEMENT notification (descriptor?, notification-type*)>
   <!ATTLIST notification      id           ID             #IMPLIED>
   <!ATTLIST notification      description  CDATA          #IMPLIED>
   <!ATTLIST notification      name         %VariableName; #IMPLIED>
  @@ -183,7 +207,7 @@
        returnType       Fully qualified Java class name of the return
                         type of this method.
   -->
  -<!ELEMENT operation   (parameter*)>
  +<!ELEMENT operation   (descriptor?, parameter*)>
   <!ATTLIST operation         id           ID             #IMPLIED>
   <!ATTLIST operation         description  CDATA          #IMPLIED>
   <!ATTLIST operation         impact       CDATA          #IMPLIED>
  
  
  
  1.1                  jakarta-commons/modeler/src/java/org/apache/commons/modeler/FieldInfo.java
  
  Index: FieldInfo.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/FieldInfo.java,v 1.1 2003/01/23 19:42:04 craigmcc Exp $
   * $Revision: 1.1 $
   * $Date: 2003/01/23 19:42:04 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  
  package org.apache.commons.modeler;
  
  
  import java.io.Serializable;
  
  
  /**
   * <p>Simple JavaBean representing the contents of a <code>&lt;field&gt;</code>
   * element in an MBeans descriptor file.
   */
  
  public class FieldInfo implements Serializable {
  
  
      /**
       * <p>The field name for this field of a descriptor.</p>
       */
      protected String name = null;
  
      public String getName() {
          return (this.name);
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
  
      /**
       * <p>The field value for this field of a descriptor.</p>
       */
      protected Object value = null;
  
      public Object getValue() {
          return (this.value);
      }
  
      public void setValue(Object value) {
          this.value = value;
      }
  
  
  }
  
  
  
  1.4       +198 -27   jakarta-commons/modeler/src/java/org/apache/commons/modeler/modules/MbeansDescriptorsDOMSource.java
  
  Index: MbeansDescriptorsDOMSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/modules/MbeansDescriptorsDOMSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MbeansDescriptorsDOMSource.java	21 Jan 2003 00:33:45 -0000	1.3
  +++ MbeansDescriptorsDOMSource.java	23 Jan 2003 19:42:08 -0000	1.4
  @@ -1,3 +1,63 @@
  +/*
  + * ====================================================================
  + *
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution, if
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowlegement may appear in the software itself,
  + *    if and wherever such third-party acknowlegements normally appear.
  + *
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
  + *    Foundation" must not be used to endorse or promote products derived
  + *    from this software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache"
  + *    nor may "Apache" appear in their names without prior written
  + *    permission of the Apache Group.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + *
  + * [Additional notices, if required by prior licensing conditions]
  + *
  + */
  +
  +
   package org.apache.commons.modeler.modules;
   
   import org.w3c.dom.Document;
  @@ -77,30 +137,86 @@
                   return;
               }
   
  +            // Process each <mbean> element
               for (Node mbeanN = firstMbeanN; mbeanN != null;
                    mbeanN= DomUtil.getNext(mbeanN))
               {
  +
  +                // Create a new managed bean info
                   ManagedBean managed=new ManagedBean();
                   DomUtil.setAttributes(managed, mbeanN);
                   Node firstN;
   
  -                // process attribute info
  +                // Process descriptor subnode
  +                Node mbeanDescriptorN =
  +                    DomUtil.getChild(mbeanN, "descriptor");
  +                if (mbeanDescriptorN != null) {
  +                    Node firstFieldN =
  +                        DomUtil.getChild(mbeanDescriptorN, "field");
  +                    for (Node fieldN = firstFieldN; fieldN != null;
  +                         fieldN = DomUtil.getNext(fieldN)) {
  +                        FieldInfo fi = new FieldInfo();
  +                        DomUtil.setAttributes(fi, fieldN);
  +                        managed.addField(fi);
  +                    }
  +                }
  +
  +                // process attribute nodes
                   firstN=DomUtil.getChild( mbeanN, "attribute");
                   for (Node descN = firstN; descN != null;
                        descN = DomUtil.getNext( descN ))
                   {
  -                    AttributeInfo ci=new AttributeInfo();
  -                    DomUtil.setAttributes(ci, descN);
  -                    managed.addAttribute( ci );
  +
  +                    // Create new attribute info
  +                    AttributeInfo ai=new AttributeInfo();
  +                    DomUtil.setAttributes(ai, descN);
  +
  +                    // Process descriptor subnode
  +                    Node descriptorN =
  +                        DomUtil.getChild(descN, "descriptor");
  +                    if (descriptorN != null) {
  +                        Node firstFieldN =
  +                            DomUtil.getChild(descriptorN, "field");
  +                        for (Node fieldN = firstFieldN; fieldN != null;
  +                             fieldN = DomUtil.getNext(fieldN)) {
  +                            FieldInfo fi = new FieldInfo();
  +                            DomUtil.setAttributes(fi, fieldN);
  +                            ai.addField(fi);
  +                        }
  +                    }
  +
  +                    // Add this info to our managed bean info
  +                    managed.addAttribute( ai );
  +                    if (log.isTraceEnabled()) {
  +                        log.trace("Create attribute " + ai);
  +                    }
  +
                   }
  -                // process constructor info
  +
  +                // process constructor nodes
                   firstN=DomUtil.getChild( mbeanN, "constructor");
                   for (Node descN = firstN; descN != null;
  -                     descN = DomUtil.getNext( descN ))
  -                {
  +                     descN = DomUtil.getNext( descN )) {
  +
  +                    // Create new constructor info
                       ConstructorInfo ci=new ConstructorInfo();
                       DomUtil.setAttributes(ci, descN);
   
  +                    // Process descriptor subnode
  +                    Node firstDescriptorN =
  +                        DomUtil.getChild(descN, "descriptor");
  +                    if (firstDescriptorN != null) {
  +                        Node firstFieldN =
  +                            DomUtil.getChild(firstDescriptorN, "field");
  +                        for (Node fieldN = firstFieldN; fieldN != null;
  +                             fieldN = DomUtil.getNext(fieldN)) {
  +                            FieldInfo fi = new FieldInfo();
  +                            DomUtil.setAttributes(fi, fieldN);
  +                            ci.addField(fi);
  +                        }
  +                    }
  +
  +                    // Process parameter subnodes
                       Node firstParamN=DomUtil.getChild( descN, "parameter");
                       for (Node paramN = firstParamN;  paramN != null;
                            paramN = DomUtil.getNext(paramN))
  @@ -109,48 +225,103 @@
                           DomUtil.setAttributes(pi, paramN);
                           ci.addParameter( pi );
                       }
  +
  +                    // Add this info to our managed bean info
                       managed.addConstructor( ci );
  +                    if (log.isTraceEnabled()) {
  +                        log.trace("Create constructor " + ci);
  +                    }
  +
                   }
  -                // process method info
  -                firstN=DomUtil.getChild( mbeanN, "operation");
  +
  +                // process notification nodes
  +                firstN=DomUtil.getChild( mbeanN, "notification");
                   for (Node descN = firstN; descN != null;
                        descN = DomUtil.getNext( descN ))
                   {
  -                    OperationInfo ci=new OperationInfo();
  -                    DomUtil.setAttributes(ci, descN);
   
  -                    Node firstParamN=DomUtil.getChild( descN, "parameter");
  +                    // Create new notification info
  +                    NotificationInfo ni=new NotificationInfo();
  +                    DomUtil.setAttributes(ni, descN);
  +
  +                    // Process descriptor subnode
  +                    Node firstDescriptorN =
  +                        DomUtil.getChild(descN, "descriptor");
  +                    if (firstDescriptorN != null) {
  +                        Node firstFieldN =
  +                            DomUtil.getChild(firstDescriptorN, "field");
  +                        for (Node fieldN = firstFieldN; fieldN != null;
  +                             fieldN = DomUtil.getNext(fieldN)) {
  +                            FieldInfo fi = new FieldInfo();
  +                            DomUtil.setAttributes(fi, fieldN);
  +                            ni.addField(fi);
  +                        }
  +                    }
  +
  +                    // Process notification-type subnodes
  +                    Node firstParamN=DomUtil.getChild( descN, "notification-type");
                       for (Node paramN = firstParamN;  paramN != null;
                            paramN = DomUtil.getNext(paramN))
                       {
  -                        ParameterInfo pi=new ParameterInfo();
  -                        DomUtil.setAttributes(pi, paramN);
  -                        if( log.isTraceEnabled())
  -                            log.trace("Add param " + pi.getName());
  -                        ci.addParameter( pi );
  +                        ni.addNotifType( DomUtil.getContent(paramN) );
                       }
  -                    managed.addOperation( ci );
  -                    if( log.isTraceEnabled())
  -                        log.trace("Create operation " + ci.getName());
  +
  +                    // Add this info to our managed bean info
  +                    managed.addNotification( ni );
  +                    if (log.isTraceEnabled()) {
  +                        log.trace("Created notification " + ni);
  +                    }
  +
                   }
  -                // process notificatio info
  -                firstN=DomUtil.getChild( mbeanN, "notification");
  +
  +                // process operation nodes
  +                firstN=DomUtil.getChild( mbeanN, "operation");
                   for (Node descN = firstN; descN != null;
                        descN = DomUtil.getNext( descN ))
  +
                   {
  -                    NotificationInfo ci=new NotificationInfo();
  -                    DomUtil.setAttributes(ci, descN);
  -                    managed.addNotification( ci );
   
  -                    Node firstParamN=DomUtil.getChild( descN, "notification-type");
  +                    // Create new operation info
  +                    OperationInfo oi=new OperationInfo();
  +                    DomUtil.setAttributes(oi, descN);
  +
  +                    // Process descriptor subnode
  +                    Node firstDescriptorN =
  +                        DomUtil.getChild(descN, "descriptor");
  +                    if (firstDescriptorN != null) {
  +                        Node firstFieldN =
  +                            DomUtil.getChild(firstDescriptorN, "field");
  +                        for (Node fieldN = firstFieldN; fieldN != null;
  +                             fieldN = DomUtil.getNext(fieldN)) {
  +                            FieldInfo fi = new FieldInfo();
  +                            DomUtil.setAttributes(fi, fieldN);
  +                            oi.addField(fi);
  +                        }
  +                    }
  +
  +                    // Process parameter subnodes
  +                    Node firstParamN=DomUtil.getChild( descN, "parameter");
                       for (Node paramN = firstParamN;  paramN != null;
                            paramN = DomUtil.getNext(paramN))
                       {
  -                        ci.addNotifType( DomUtil.getContent(paramN) );
  +                        ParameterInfo pi=new ParameterInfo();
  +                        DomUtil.setAttributes(pi, paramN);
  +                        if( log.isTraceEnabled())
  +                            log.trace("Add param " + pi.getName());
  +                        oi.addParameter( pi );
  +                    }
  +
  +                    // Add this info to our managed bean info
  +                    managed.addOperation( oi );
  +                    if( log.isTraceEnabled()) {
  +                        log.trace("Create operation " + oi);
                       }
  +
                   }
   
  +                // Add the completed managed bean info to the registry
                   registry.addManagedBean(managed);
  +
               }
   
               long t2=System.currentTimeMillis();
  
  
  
  1.4       +111 -0    jakarta-commons/modeler/src/java/org/apache/commons/modeler/modules/MbeansDescriptorsDigesterSource.java
  
  Index: MbeansDescriptorsDigesterSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/modules/MbeansDescriptorsDigesterSource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MbeansDescriptorsDigesterSource.java	21 Jan 2003 00:33:45 -0000	1.3
  +++ MbeansDescriptorsDigesterSource.java	23 Jan 2003 19:42:08 -0000	1.4
  @@ -1,3 +1,63 @@
  +/*
  + * ====================================================================
  + *
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution, if
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowlegement may appear in the software itself,
  + *    if and wherever such third-party acknowlegements normally appear.
  + *
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
  + *    Foundation" must not be used to endorse or promote products derived
  + *    from this software without prior written permission. For written
  + *    permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache"
  + *    nor may "Apache" appear in their names without prior written
  + *    permission of the Apache Group.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + *
  + * [Additional notices, if required by prior licensing conditions]
  + *
  + */
  +
  +
   package org.apache.commons.modeler.modules;
   
   import org.apache.commons.digester.Digester;
  @@ -90,6 +150,16 @@
                           "org.apache.commons.modeler.AttributeInfo");
   
           digester.addObjectCreate
  +            ("mbeans-descriptors/mbean/attribute/descriptor/field",
  +             "org.apache.commons.modeler.FieldInfo");
  +        digester.addSetProperties
  +            ("mbeans-descriptors/mbean/attribute/descriptor/field");
  +        digester.addSetNext
  +            ("mbeans-descriptors/mbean/attribute/descriptor/field",
  +             "addField",
  +             "org.apache.commons.modeler.FieldInfo");
  +
  +        digester.addObjectCreate
                   ("mbeans-descriptors/mbean/constructor",
                           "org.apache.commons.modeler.ConstructorInfo");
           digester.addSetProperties
  @@ -100,6 +170,16 @@
                           "org.apache.commons.modeler.ConstructorInfo");
   
           digester.addObjectCreate
  +            ("mbeans-descriptors/mbean/constructor/descriptor/field",
  +             "org.apache.commons.modeler.FieldInfo");
  +        digester.addSetProperties
  +            ("mbeans-descriptors/mbean/constructor/descriptor/field");
  +        digester.addSetNext
  +            ("mbeans-descriptors/mbean/constructor/descriptor/field",
  +             "addField",
  +             "org.apache.commons.modeler.FieldInfo");
  +
  +        digester.addObjectCreate
                   ("mbeans-descriptors/mbean/constructor/parameter",
                           "org.apache.commons.modeler.ParameterInfo");
           digester.addSetProperties
  @@ -110,6 +190,16 @@
                           "org.apache.commons.modeler.ParameterInfo");
   
           digester.addObjectCreate
  +            ("mbeans-descriptors/mbean/descriptor/field",
  +             "org.apache.commons.modeler.FieldInfo");
  +        digester.addSetProperties
  +            ("mbeans-descriptors/mbean/descriptor/field");
  +        digester.addSetNext
  +            ("mbeans-descriptors/mbean/descriptor/field",
  +             "addField",
  +             "org.apache.commons.modeler.FieldInfo");
  +
  +        digester.addObjectCreate
                   ("mbeans-descriptors/mbean/notification",
                           "org.apache.commons.modeler.NotificationInfo");
           digester.addSetProperties
  @@ -118,6 +208,17 @@
                   ("mbeans-descriptors/mbean/notification",
                           "addNotification",
                           "org.apache.commons.modeler.NotificationInfo");
  +
  +        digester.addObjectCreate
  +            ("mbeans-descriptors/mbean/notification/descriptor/field",
  +             "org.apache.commons.modeler.FieldInfo");
  +        digester.addSetProperties
  +            ("mbeans-descriptors/mbean/notification/descriptor/field");
  +        digester.addSetNext
  +            ("mbeans-descriptors/mbean/notification/descriptor/field",
  +             "addField",
  +             "org.apache.commons.modeler.FieldInfo");
  +
           digester.addCallMethod
                   ("mbeans-descriptors/mbean/notification/notification-type",
                           "addNotifType", 0);
  @@ -131,6 +232,16 @@
                   ("mbeans-descriptors/mbean/operation",
                           "addOperation",
                           "org.apache.commons.modeler.OperationInfo");
  +
  +        digester.addObjectCreate
  +            ("mbeans-descriptors/mbean/operation/descriptor/field",
  +             "org.apache.commons.modeler.FieldInfo");
  +        digester.addSetProperties
  +            ("mbeans-descriptors/mbean/operation/descriptor/field");
  +        digester.addSetNext
  +            ("mbeans-descriptors/mbean/operation/descriptor/field",
  +             "addField",
  +             "org.apache.commons.modeler.FieldInfo");
   
           digester.addObjectCreate
                   ("mbeans-descriptors/mbean/operation/parameter",
  
  
  
  1.3       +7 -2      jakarta-commons/modeler/src/java/org/apache/commons/modeler/util/IntrospectionUtils.java
  
  Index: IntrospectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/util/IntrospectionUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IntrospectionUtils.java	7 Jan 2003 21:07:40 -0000	1.2
  +++ IntrospectionUtils.java	23 Jan 2003 19:42:08 -0000	1.3
  @@ -3,7 +3,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -25,7 +25,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -347,6 +347,11 @@
    			    d("Unable to resolve host name:" + value);
    			    ok=false;
    			}
  +
  +                    // Try a setFoo ( Object )
  +                    } else if ("java.lang.Object".
  +                               equals( paramType.getName())) {
  +                        params[0] = value;
   
    		    // Unknown type
   		    } else {
  
  
  
  1.2       +169 -5    jakarta-commons/modeler/src/test/org/apache/commons/modeler/RegistryTestCase.java
  
  Index: RegistryTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/test/org/apache/commons/modeler/RegistryTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RegistryTestCase.java	30 Apr 2002 20:58:52 -0000	1.1
  +++ RegistryTestCase.java	23 Jan 2003 19:42:08 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -65,6 +65,10 @@
   
   import java.io.FileInputStream;
   import java.util.EmptyStackException;
  +import java.util.List;
  +import java.util.Map;
  +import javax.management.Descriptor;
  +import javax.management.modelmbean.ModelMBeanInfo;
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  @@ -148,6 +152,125 @@
   
   
       /**
  +     * Test descriptor entries.
  +     */
  +    public void testDescriptorEntries() {
  +
  +        // Retrive the ManageBean that has descriptor info
  +        ManagedBean http = registry.findManagedBean("HttpConnector");
  +        assertNotNull("Found HttpConnector managed bean");
  +
  +        // Check descriptor fields on the ManagedBean itself
  +        List beanFields = http.getFields();
  +        assertNotNull("Found HttpConnector fields");
  +        checkField(beanFields, "field1", "HttpConnector/field1");
  +        checkField(beanFields, "field2", "HttpConnector/field2");
  +
  +        // Retrieve the AttributeInfo that has descriptors set
  +        AttributeInfo attrs[] = http.getAttributes();
  +        AttributeInfo attr = null;
  +        for (int i = 0; i < attrs.length; i++) {
  +            if ("acceptCount".equals(attrs[i].getName())) {
  +                attr = attrs[i];
  +                break;
  +            }
  +        }
  +        assertNotNull("Found attribute");
  +
  +        // Check descriptor fields on the AttributeInfo
  +        List attrFields = attr.getFields();
  +        assertNotNull("Found attribute fields");
  +        checkField(attrFields, "field1", "HttpConnector.acceptCount/field1");
  +        checkField(attrFields, "field2", "HttpConnector.acceptCount/field2");
  +
  +        // Retrieve the ConstructorInfo that has descriptors set
  +        ConstructorInfo constrs[] = http.getConstructors();
  +        ConstructorInfo constr = null;
  +        for (int i = 0; i < constrs.length; i++) {
  +            if ("HttpConnector".equals(constrs[i].getName())) {
  +                constr = constrs[i];
  +                break;
  +            }
  +        }
  +        assertNotNull("Found constructor");
  +
  +        // Check descriptor fields on the ConstructorInfo
  +        List constrFields = constr.getFields();
  +        assertNotNull("Found constructor fields");
  +        checkField(constrFields, "field1", "HttpConnector.constructor/field1");
  +        checkField(constrFields, "field2", "HttpConnector.constructor/field2");
  +
  +        // Retrieve the NotificationInfo that has descriptors set
  +        NotificationInfo notifs[] = http.getNotifications();
  +        NotificationInfo notif = null;
  +        for (int i = 0; i < notifs.length; i++) {
  +            if ("Problem".equals(notifs[i].getName())) {
  +                notif = notifs[i];
  +                break;
  +            }
  +        }
  +        assertNotNull("Found notification");
  +
  +        // Check descriptor fields on the NotificationInfo
  +        List notifFields = notif.getFields();
  +        assertNotNull("Found notification fields");
  +        checkField(notifFields, "field1", "HttpConnector.problem/field1");
  +        checkField(notifFields, "field2", "HttpConnector.problem/field2");
  +
  +        // Retrieve the OperationInfo that has descriptors set
  +        OperationInfo opers[] = http.getOperations();
  +        OperationInfo oper = null;
  +        for (int i = 0; i < opers.length; i++) {
  +            if ("initialize".equals(opers[i].getName())) {
  +                oper = opers[i];
  +                break;
  +            }
  +        }
  +        assertNotNull("Found operation");
  +
  +        // Check descriptor fields on the OperationInfo
  +        List operFields = oper.getFields();
  +        assertNotNull("Found operation fields");
  +        checkField(operFields, "field1", "HttpConnector.initialize/field1");
  +        checkField(operFields, "field2", "HttpConnector.initialize/field2");
  +
  +    }
  +
  +
  +    /**
  +     * Test ModelMBeanInfo information.
  +     */
  +    public void testModelMBeanInfo() throws Exception {
  +
  +        // Retrive a ManageBean
  +        ManagedBean http = registry.findManagedBean("HttpConnector");
  +        assertNotNull("Found HttpConnector managed bean");
  +
  +        // Create the associated ModelMBeanInfo
  +        ModelMBeanInfo info = http.createMBeanInfo();
  +        assertNotNull("Found HttpConnector ModelMBeanInfo", info);
  +
  +        // Check the basic properties
  +        assertEquals("Correct className",
  +                     "org.apache.catalina.mbeans.HttpConnectorModelMBean",
  +                     info.getClassName());
  +        assertEquals("Correct description",
  +                     "HTTP/1.1 Connector for Tomcat Standalone",
  +                     info.getDescription());
  +
  +        // Get the Descriptor
  +        Descriptor desc = info.getMBeanDescriptor();
  +        assertNotNull("Found HttpConnector MBeanDescriptor", desc);
  +
  +        // Check the configured fields
  +        checkDescriptor(desc, "descriptortype", "MBean");
  +        checkDescriptor(desc, "field1", "HttpConnector/field1");
  +        checkDescriptor(desc, "field2", "HttpConnector/field2");
  +
  +    }
  +
  +
  +    /**
        * Test registry creation.
        */
       public void testRegistryCreation() {
  @@ -165,6 +288,47 @@
           for (int i = 0; i < names.length; i++)
               System.out.println("  " + names[i]);
           System.out.println("-------------------------");
  +
  +    }
  +
  +
  +    // ------------------------------------------------------ Protected Methods
  +
  +
  +    // Check presence of an appropriate name/value pair in the descriptor
  +    protected void checkDescriptor(Descriptor desc, String name,
  +                                   Object value) {
  +
  +        String names[] = desc.getFieldNames();
  +        boolean found = false;
  +        for (int i = 0; i < names.length; i++) {
  +            if (name.equals(names[i])) {
  +                found = true;
  +                break;
  +            }
  +        }
  +        assertTrue("Found name " + name, found);
  +        assertEquals("Correct name " + name + " value",
  +                     value,
  +                     desc.getFieldValue(name));
  +
  +    }
  +
  +
  +    // Check presence of an appropriate FieldInfo
  +    protected void checkField(List fields, String name, Object value) {
  +
  +        int n = fields.size();
  +        for (int i = 0; i < n; i++) {
  +            FieldInfo field = (FieldInfo) fields.get(i);
  +            if (name.equals(field.getName())) {
  +                assertEquals("name=" + name + " value",
  +                             value,
  +                             field.getValue());
  +                return;
  +            }
  +        }
  +        fail("Cannot find field name=" + name + " and value=" + value);
   
       }
   
  
  
  
  1.2       +33 -3     jakarta-commons/modeler/src/test/org/apache/commons/modeler/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/test/org/apache/commons/modeler/mbeans-descriptors.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mbeans-descriptors.xml	30 Apr 2002 20:58:52 -0000	1.1
  +++ mbeans-descriptors.xml	23 Jan 2003 19:42:08 -0000	1.2
  @@ -12,9 +12,20 @@
             description="HTTP/1.1 Connector for Tomcat Standalone"
                    type="org.apache.catalina.connector.http.HttpConnector">
   
  +    <descriptor>
  +      <field     name="field1" value="HttpConnector/field1"/>
  +      <field     name="field2" value="HttpConnector/field2"/>
  +    </descriptor>
  +
  +
       <attribute   name="acceptCount"
             description="Maximum socket accept queue length"
  -                 type="int"/>
  +                 type="int">
  +      <descriptor>
  +        <field   name="field1" value="HttpConnector.acceptCount/field1"/>
  +        <field   name="field2" value="HttpConnector.acceptCount/field2"/>
  +      </descriptor>
  +    </attribute>
   
       <attribute   name="address"
             description="Specific IP address to bind to"
  @@ -101,12 +112,31 @@
             description="Set the TCP no-delay option on our connections?"
                    type="boolean"/>
   
  -    <constructor name="HttpConnector"/>
  +    <constructor name="HttpConnector">
  +      <descriptor>
  +        <field   name="field1" value="HttpConnector.constructor/field1"/>
  +        <field   name="field2" value="HttpConnector.constructor/field2"/>
  +      </descriptor>
  +    </constructor>
  +
  +    <notification name="Problem">
  +      <descriptor>
  +        <field   name="field1" value="HttpConnector.problem/field1"/>
  +        <field   name="field2" value="HttpConnector.problem/field2"/>
  +      </descriptor>
  +      <notification-type>This is a problem</notification-type>
  +    </notification>
  +
   
       <operation   name="initialize"
             description="Perform pre-startup initialization"
                  impact="ACTION"
  -           returnType="void"/>
  +           returnType="void">
  +      <descriptor>
  +        <field   name="field1" value="HttpConnector.initialize/field1"/>
  +        <field   name="field2" value="HttpConnector.initialize/field2"/>
  +      </descriptor>
  +    </operation>
   
       <operation   name="start"
             description="Start this Connector and processing threads"
  
  
  

--
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