costin      2003/01/27 15:35:47

  Modified:    catalina/src/share/org/apache/catalina/core
                        ContainerBase.java
  Log:
  Added a "type" attribute, corresponding to the j2eeType or type from the name.
  
  Make the j2eesuffix ( used internally ) protected, so it won't show in the console.
  
  Revision  Changes    Path
  1.4       +14 -4     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java
  
  Index: ContainerBase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContainerBase.java        11 Jan 2003 05:07:50 -0000      1.3
  +++ ContainerBase.java        27 Jan 2003 23:35:47 -0000      1.4
  @@ -601,7 +601,6 @@
           String oldName = this.name;
           this.name = name;
           support.firePropertyChange("name", oldName, this.name);
  -
       }
   
   
  @@ -817,7 +816,7 @@
                   throw new IllegalArgumentException("addChild:  Child name '" +
                                                      child.getName() +
                                                      "' is not unique");
  -            child.setParent((Container) this);  // May throw IAE
  +            child.setParent(this);  // May throw IAE
               if (started && (child instanceof Lifecycle)) {
                   try {
                       ((Lifecycle) child).start();
  @@ -1462,6 +1461,7 @@
       }
   
       // -------------------- JMX and Registration  --------------------
  +    protected String type;
       protected String domain;
       protected String suffix;
       protected ObjectName oname;
  @@ -1475,7 +1475,11 @@
           return domain;
       }
   
  -    public String getJSR77Suffix() {
  +    public String getType() {
  +        return type;
  +    }
  +
  +    protected String getJSR77Suffix() {
           return suffix;
       }
   
  @@ -1484,6 +1488,12 @@
           oname=name;
           mserver=server;
           domain=name.getDomain();
  +
  +        type=name.getKeyProperty("type");
  +        if( type==null ) {
  +            type=name.getKeyProperty("j2eeType");
  +        }
  +
           String j2eeApp=name.getKeyProperty("J2EEApplication");
           String j2eeServer=name.getKeyProperty("J2EEServer");
           if( j2eeApp==null ) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to