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/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources SaveDataSourceAction.java SetUpDataSourceAction.java
Date Wed, 08 May 2002 03:39:56 GMT
craigmcc    02/05/07 20:39:56

  Modified:    webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources
                        SaveDataSourceAction.java
                        SetUpDataSourceAction.java
  Log:
  As far as the MBean for data source resources is concerned, all of the
  extra properties are strings, not integers.
  
  Revision  Changes    Path
  1.2       +13 -30    jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveDataSourceAction.java
  
  Index: SaveDataSourceAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveDataSourceAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SaveDataSourceAction.java	8 May 2002 00:41:18 -0000	1.1
  +++ SaveDataSourceAction.java	8 May 2002 03:39:56 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveDataSourceAction.java,v
1.1 2002/05/08 00:41:18 manveen Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/05/08 00:41:18 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveDataSourceAction.java,v
1.2 2002/05/08 03:39:56 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/05/08 03:39:56 $
    *
    * ====================================================================
    *
  @@ -96,7 +96,7 @@
    * updated data source entry.</p>
    *
    * @author Manveen Kaur
  - * @version $Revision: 1.1 $ $Date: 2002/05/08 00:41:18 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/08 03:39:56 $
    * @since 4.1
    */
   
  @@ -226,34 +226,17 @@
                   (oname,
                    new Attribute(attribute, dataSourceForm.getPassword()));
               attribute = "maxActive";
  -            int maxActive = 4;
  -            try {
  -                maxActive = Integer.parseInt(dataSourceForm.getActive());
  -            } catch (Throwable t) {
  -                maxActive = 4;
  -            }
  -            mserver.setAttribute(oname,
  -                                  new Attribute(attribute, new Integer(maxActive)));  
         
  +            mserver.setAttribute
  +                (oname,
  +                 new Attribute(attribute, dataSourceForm.getActive()));
               attribute = "maxIdle";
  -            int maxIdle = 2;
  -            try {
  -                maxIdle = Integer.parseInt(dataSourceForm.getIdle());
  -            } catch (Throwable t) {
  -                maxIdle = 2;
  -            }
  -            mserver.setAttribute(oname,
  -                                  new Attribute(attribute, new Integer(maxIdle)));    
       
  -                                  
  +            mserver.setAttribute
  +                (oname,
  +                 new Attribute(attribute, dataSourceForm.getIdle()));
               attribute = "maxWait";
  -            int maxWait = 5000;
  -            try {
  -                maxWait = Integer.parseInt(dataSourceForm.getWait());
  -            } catch (Throwable t) {
  -                maxWait = 5000;
  -            }
  -            mserver.setAttribute(oname,
  -                                  new Attribute(attribute, new Integer(maxWait)));    
       
  -            
  +            mserver.setAttribute
  +                (oname,
  +                 new Attribute(attribute, dataSourceForm.getWait()));
               attribute = "validationQuery";
               mserver.setAttribute
                   (oname,
  
  
  
  1.3       +9 -9      jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpDataSourceAction.java
  
  Index: SetUpDataSourceAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpDataSourceAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetUpDataSourceAction.java	7 May 2002 23:37:55 -0000	1.2
  +++ SetUpDataSourceAction.java	8 May 2002 03:39:56 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpDataSourceAction.java,v
1.2 2002/05/07 23:37:55 manveen Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/05/07 23:37:55 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpDataSourceAction.java,v
1.3 2002/05/08 03:39:56 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/05/08 03:39:56 $
    *
    * ====================================================================
    *
  @@ -96,7 +96,7 @@
    * being added, or a non-null value for an existing DataSource.</p>
    *
    * @author Manveen Kaur
  - * @version $Revision: 1.2 $ $Date: 2002/05/07 23:37:55 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/08 03:39:56 $
    * @since 4.1
    */
   
  @@ -182,13 +182,13 @@
                       ((String) mserver.getAttribute(oname, attribute));
                   attribute = "maxActive";
                   dataSourceForm.setActive
  -                    (((Integer) mserver.getAttribute(oname, attribute)).toString());  
             
  -                attribute = "maxWait";
  -                dataSourceForm.setWait
  -                    (((Integer) mserver.getAttribute(oname, attribute)).toString());
  +                    ((String) mserver.getAttribute(oname, attribute));
                   attribute = "maxIdle";
                   dataSourceForm.setIdle
  -                    (((Integer) mserver.getAttribute(oname, attribute)).toString());
  +                    ((String) mserver.getAttribute(oname, attribute));
  +                attribute = "maxWait";
  +                dataSourceForm.setWait
  +                    ((String) mserver.getAttribute(oname, attribute));
                   attribute = "validationQuery";
                   dataSourceForm.setQuery
                       ((String) mserver.getAttribute(oname, attribute));
  
  
  

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