You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2003/08/19 00:10:12 UTC

cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service MBeanRelationship.java

dain        2003/08/18 15:10:12

  Modified:    modules/core/src/java/org/apache/geronimo/deployment/service
                        MBeanRelationship.java
  Log:
  Added setTargetRole, so we can remember the role we assigned the target when we guess
  the target role.
  
  Added created relationship flag so we can remember if we created the relationship on start
  so we can remove it on stop.
  
  Revision  Changes    Path
  1.4       +34 -2     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MBeanRelationship.java	16 Aug 2003 23:16:34 -0000	1.3
  +++ MBeanRelationship.java	18 Aug 2003 22:10:12 -0000	1.4
  @@ -88,7 +88,13 @@
        * 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;
  +    private String targetRole;
  +
  +    /**
  +     * Did this MBean create the relationship instance.  If it did, the MBean will attempt to remove the
  +     * relationship when stopped
  +     */
  +    private boolean createdRelationship;
   
       /**
        * Creates a new MBeanRelationship, which is used during deployment to enroll the new MBean in a relationship.
  @@ -147,5 +153,31 @@
        */
       public String getTargetRole() {
           return targetRole;
  +    }
  +
  +    /**
  +     * Sets the name of the role that was assigned to the target MBean.
  +     * @param targetRole the name of the role that was assigned to the target MBean
  +     */
  +    public void setTargetRole(String targetRole) {
  +        this.targetRole = targetRole;
  +    }
  +
  +    /**
  +     * Did this MBean create the relationship instance.  If it did, the MBean will attempt to remove the
  +     * relationship when stopped.
  +     * @return true if this MBean created the relationship
  +     */
  +    public boolean getCreatedRelationship() {
  +        return createdRelationship;
  +    }
  +
  +    /**
  +     * Sets the created relationship flag.  If this MBean created the relationship, it will attempt to
  +     * remove the relationship when stopped.
  +     * @param createdRelationship the new created relationship flag
  +     */
  +    public void setCreatedRelationship(boolean createdRelationship) {
  +        this.createdRelationship = createdRelationship;
       }
   }