tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup NamingRuleSet.java
Date Thu, 02 May 2002 23:10:13 GMT
craigmcc    02/05/02 16:10:13

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        StandardServerMBean.java
               catalina/src/share/org/apache/catalina/startup
                        NamingRuleSet.java
  Log:
  Work around the lack of an o.a.c.deploy.ContextResourceEnvRef for now.
  
  Revision  Changes    Path
  1.18      +29 -4     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- StandardServerMBean.java	2 May 2002 22:14:45 -0000	1.17
  +++ StandardServerMBean.java	2 May 2002 23:10:13 -0000	1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
1.17 2002/05/02 22:14:45 craigmcc Exp $
  - * $Revision: 1.17 $
  - * $Date: 2002/05/02 22:14:45 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
1.18 2002/05/02 23:10:13 craigmcc Exp $
  + * $Revision: 1.18 $
  + * $Date: 2002/05/02 23:10:13 $
    *
    * ====================================================================
    *
  @@ -120,7 +120,7 @@
    * <code>org.apache.catalina.core.StandardServer</code> component.</p>
    *
    * @author Amy Roh
  - * @version $Revision: 1.17 $ $Date: 2002/05/02 22:14:45 $
  + * @version $Revision: 1.18 $ $Date: 2002/05/02 23:10:13 $
    */
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -1188,6 +1188,31 @@
               writer.print("<Resource");
               storeAttributes(writer, false, dresources[i]);
               writer.println("/>");
  +        }
  +
  +        // Store nested <ResourceEnvRef> elements
  +        String[] eresources = resources.findResourceEnvRefs();
  +        for (int i = 0; i < eresources.length; i++) {
  +            for (int j = 0; j < indent; j++) {
  +                writer.print(' ');
  +            }
  +            writer.println("<ResourceEnvRef>");
  +            for (int j = 0; j < indent + 2; j++) {
  +                writer.print(' ');
  +            }
  +            writer.print("<name>");
  +            writer.print(eresources[i]);
  +            writer.println("</name>");
  +            for (int j = 0; j < indent + 2; j++) {
  +                writer.print(' ');
  +            }
  +            writer.print("<type>");
  +            writer.print(resources.findResourceEnvRef(eresources[i]));
  +            writer.println("</type>");
  +            for (int j = 0; j < indent; j++) {
  +                writer.print(' ');
  +            }
  +            writer.println("</ResourceEnvRef>");
           }
   
           // Store nested <ResourceParams> elements
  
  
  
  1.3       +9 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java
  
  Index: NamingRuleSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NamingRuleSet.java	2 May 2002 22:14:45 -0000	1.2
  +++ NamingRuleSet.java	2 May 2002 23:10:13 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java,v
1.2 2002/05/02 22:14:45 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/05/02 22:14:45 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/NamingRuleSet.java,v
1.3 2002/05/02 23:10:13 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/05/02 23:10:13 $
    *
    * ====================================================================
    *
  @@ -82,7 +82,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2002/05/02 22:14:45 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/02 23:10:13 $
    */
   
   public class NamingRuleSet extends RuleSetBase {
  @@ -168,6 +168,11 @@
           digester.addSetNext(prefix + "Resource",
                               "addResource",
                               "org.apache.catalina.deploy.ContextResource");
  +
  +        digester.addCallMethod(prefix + "ResourceEnvRef",
  +                               "addResourceEnvRef", 2);
  +        digester.addCallParam(prefix + "ResourceEnvRef/name", 0);
  +        digester.addCallParam(prefix + "ResourceEnvRef/type", 1);
   
           digester.addObjectCreate(prefix + "ResourceParams",
                                    "org.apache.catalina.deploy.ResourceParams");
  
  
  

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


Mime
View raw message