geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service MBeanMetadataXMLLoader.java MBeanRelationship.java
Date Wed, 13 Aug 2003 21:17:24 GMT
dain        2003/08/13 14:17:24

  Modified:    modules/core/src/java/org/apache/geronimo/deployment/service
                        MBeanMetadataXMLLoader.java MBeanRelationship.java
  Log:
  Fixed MBean relationship creation.  I was assuming that a relationship could only have two
roles, but a relationship can have zero or more roles.
  
  Revision  Changes    Path
  1.3       +3 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service/MBeanMetadataXMLLoader.java
  
  Index: MBeanMetadataXMLLoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service/MBeanMetadataXMLLoader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MBeanMetadataXMLLoader.java	11 Aug 2003 19:46:28 -0000	1.2
  +++ MBeanMetadataXMLLoader.java	13 Aug 2003 21:17:24 -0000	1.3
  @@ -115,7 +115,8 @@
               String type = argElement.getAttribute("type");
               String role = argElement.getAttribute("role");
               String target = argElement.getAttribute("target");
  -            MBeanRelationship relationship = new MBeanRelationship(name, type, role, target);
  +            String targetRole = argElement.getAttribute("targetRole");
  +            MBeanRelationship relationship = new MBeanRelationship(name, type, role, target,
targetRole);
               relationships.add(relationship);
           }
   
  
  
  
  1.2       +63 -5     incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service/MBeanRelationship.java
  
  Index: MBeanRelationship.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service/MBeanRelationship.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MBeanRelationship.java	11 Aug 2003 17:59:11 -0000	1.1
  +++ MBeanRelationship.java	13 Aug 2003 21:17:24 -0000	1.2
  @@ -56,36 +56,94 @@
   package org.apache.geronimo.deployment.service;
   
   /**
  - *
  + * This class contains metadata necessary to enroll an MBean in a relationship.
    *
    * @version $Revision$ $Date$
    */
   public class MBeanRelationship {
  +    /**
  +     * The name of the relationship (A.K.A relationshipID)
  +     */
       private final String name;
  +
  +    /**
  +     * The type of the relationship.  This is used if a new relationship instance is created
during deployment.
  +     */
       private final String type;
  +
  +    /**
  +     * The name of the role to enroll the MBean
  +     */
       private final String role;
  +
  +    /**
  +     * The name of the target MBean to which this MBean will be related.  This is only
used if a new relationship
  +     * is created during deployment.
  +     */
       private final String target;
   
  -    public MBeanRelationship(String name, String type, String role, String target) {
  +    /**
  +     * The name of the role to assign the target MBean.  This is only used if a new relationship
is created during
  +     * deployment.  This is only neccessary if the relationship has more then two roles.
  +     */
  +    private final String targetRole;
  +
  +    /**
  +     * Creates a new MBeanRelationship, which is used during deployment to enroll the new
MBean in a relationship.
  +     *
  +     * @param name name of the relationship
  +     * @param type type of the relationship
  +     * @param role role to which this MBean will be added
  +     * @param target the object name of another MBean to add to relationship if a new relationship
is created
  +     * @param targetRole the role to assign the target MBean
  +     */
  +    public MBeanRelationship(String name, String type, String role, String target, String
targetRole) {
           this.name = name;
           this.type = type;
           this.role = role;
           this.target = target;
  +        this.targetRole = targetRole;
       }
   
  +    /**
  +     * The name of the relationship (A.K.A relationshipID)
  +     * @return the name of the relationship
  +     */
       public String getName() {
           return name;
       }
   
  +    /**
  +     * The type of the relationship.  This is used if a new relationship instance is created
during deployment.
  +     * @return the relationship type
  +     */
  +    public String getType() {
  +        return type;
  +    }
  +
  +    /**
  +     * The name of the role to enroll the MBean.
  +     * @return name of the role to which this MBean will be assigned
  +     */
       public String getRole() {
           return role;
       }
   
  +    /**
  +     * The name of the target MBean to which this MBean will be related.  This is only
used if a new relationship
  +     * is created during deployment.
  +     * @return object name of the target MBean
  +     */
       public String getTarget() {
           return target;
       }
   
  -    public String getType() {
  -        return type;
  +    /**
  +     * The name of the role to assign the target MBean.  This is only used if a new relationship
is created during
  +     * deployment.  This is only neccessary if the relationship has more then two roles.
  +     * @return name of the role to which the target MBean will be assigned
  +     */
  +    public String getTargetRole() {
  +        return targetRole;
       }
   }
  
  
  

Mime
View raw message