craigmcc    01/06/02 11:18:25

  Modified:    conf/share Tag: STRUTS_1_0_BRANCH struts-config_1_0.dtd
               src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
                        package.html
               web/example/WEB-INF Tag: STRUTS_1_0_BRANCH struts-config.xml
  Log:
  Update the struts-config DTD (and the associated examples) to indicate
  that <set-property> elements should be used to configure *all* properties
  of any <data-source> element you provide.  This makes it easier to
  substitute alternate data source implementations (the only Struts-based
  requirment is that it must implement javax.sql.DataSource) and configure
  it, with no dependencies on the struts-config DTD.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.1   +25 -18    jakarta-struts/conf/share/struts-config_1_0.dtd
  
  Index: struts-config_1_0.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/conf/share/struts-config_1_0.dtd,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- struts-config_1_0.dtd     2001/05/20 01:46:00     1.4
  +++ struts-config_1_0.dtd     2001/06/02 18:18:25     1.4.2.1
  @@ -11,7 +11,7 @@
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
   
  -     $Id: struts-config_1_0.dtd,v 1.4 2001/05/20 01:46:00 craigmcc Exp $
  +     $Id: struts-config_1_0.dtd,v 1.4.2.1 2001/06/02 18:18:25 craigmcc Exp $
   -->
   
   
  @@ -96,15 +96,24 @@
        source object (that implements javax.sql.DataSource) which will be
        configured according to the properties and nested elements found here,
        and made available as a servlet context attribute (i.e. application
  -     scope bean).  The following attributes are defined:
  +     scope bean).  The following attributes are required:
   
  +     key             Servlet context attribute key under which this data
  +                     source will be stored.  Default is the value specified
  +                     by string constant Action.DATA_SOURCE_KEY.
  +
        type            Fully qualified Java class name of the implementation
  -                     class (must implement javax.sql.DataSource).
  +                     class (must implement javax.sql.DataSource).  Default
  +                     value is 'org.apache.struts.util.GenericDataSource'.
   
        NOTE:  The following attributes are defined by the default data source
        implementation, and only take effect for that class or subclasses of
        that class.
   
  +     WARNING:  The use of these attributes is deprecated.  You should use
  +     nested &lt;set-property&gt; elements to configure *all* properties of
  +     your data source implementation.
  +
        autoCommit      The default auto-commit state for newly created
                        connections.
   
  @@ -113,12 +122,8 @@
        driverClass     The Java class name of the JDBC driver to be used.
                        [REQUIRED]
   
  -     key             Servlet context attribute key under which this data
  -                     source will be stored.  Default is the value specified
  -                     by string constant Action.DATA_SOURCE_KEY.
  -
        loginTimeout    The maximum number of seconds to wait for a connection
  -                     to be created or returned.
  +                     to be created or returned.  Default is driver dependent.
   
        maxCount        The maximum number of connections to be created.
   
  @@ -136,18 +141,20 @@
   -->
   <!ELEMENT data-source (set-property*)>
   <!ATTLIST data-source    id             ID              #IMPLIED>
  -<!ATTLIST data-source    type           %ClassName;     
"org.apache.struts.util.GenericDataSource">
  -<!ATTLIST data-source    autoCommit     %Boolean;       "true">
  -<!ATTLIST data-source    description    CDATA           #IMPLIED>
  -<!ATTLIST data-source    driverClass    %ClassName;     #REQUIRED>
   <!ATTLIST data-source    key            %BeanName;      #IMPLIED>
  +<!ATTLIST data-source    type           %ClassName;     #IMPLIED>
  +<!-- All of the following attributes are deprecated.  Use a nested          -->
  +<!-- set-property element to configure data source properties.              -->
  +<!ATTLIST data-source    autoCommit     %Boolean;       #IMPLIED>
  +<!ATTLIST data-source    description    CDATA           #IMPLIED>
  +<!ATTLIST data-source    driverClass    %ClassName;     #IMPLIED>
   <!ATTLIST data-source    loginTimeout   %Integer;       #IMPLIED>
  -<!ATTLIST data-source    maxCount       %Integer;       "2">
  -<!ATTLIST data-source    minCount       %Integer;       "1">
  -<!ATTLIST data-source    password       CDATA           #REQUIRED>
  -<!ATTLIST data-source    readOnly       %Boolean;       "false">
  -<!ATTLIST data-source    url            CDATA           #REQUIRED>
  -<!ATTLIST data-source    user           CDATA           #REQUIRED>
  +<!ATTLIST data-source    maxCount       %Integer;       #IMPLIED>
  +<!ATTLIST data-source    minCount       %Integer;       #IMPLIED>
  +<!ATTLIST data-source    password       CDATA           #IMPLIED>
  +<!ATTLIST data-source    readOnly       %Boolean;       #IMPLIED>
  +<!ATTLIST data-source    url            CDATA           #IMPLIED>
  +<!ATTLIST data-source    user           CDATA           #IMPLIED>
   
   
   <!-- The "form-beans" element is the root of the set of form bean descriptors
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +18 -6     jakarta-struts/src/share/org/apache/struts/util/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/util/package.html,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- package.html      2001/03/31 22:22:23     1.6
  +++ package.html      2001/06/02 18:18:25     1.6.2.1
  @@ -434,12 +434,24 @@
   Simply include a section that looks like this:</p>
   <pre>
       &lt;data-sources&gt;
  -        &lt;data-source
  -          autoCommit="false" description="My Database Connection Pool"
  -          driverClass="org.postgresql.Driver" maxCount="4" minCount="1"
  -          password="mypassword" url="jdbc:postgresql://localhost/mydatabase"
  -          user="myusername"
  -        /&gt;
  +      &lt;data-source&gt;
  +        &lt;set-property property="autoCommit"
  +                      value="false"/&gt;
  +        &lt;set-property property="description"
  +                      value="Example Data Source Configuration"/&gt;
  +        &lt;set-property property="driverClass"
  +                      value="org.postgresql.Driver"/&gt;
  +        &lt;set-property property="maxCount"
  +                      value="4"/&gt;
  +        &lt;set-property property="minCount"
  +                      value="2"/&gt;
  +        &lt;set-property property="password"
  +                      value="mypassword"/&gt;
  +        &lt;set-property property="url"
  +                      value="jdbc:postgresql://localhost/mydatabase"/&gt;
  +        &lt;set-property property="user"
  +                      value="myusername"/&gt;
  +      &lt;/data-source&gt;
       &lt;/data-sources&gt;
   </pre>
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.1  +18 -10    jakarta-struts/web/example/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/struts-config.xml,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- struts-config.xml 2001/04/11 02:08:20     1.10
  +++ struts-config.xml 2001/06/02 18:18:25     1.10.2.1
  @@ -22,16 +22,24 @@
     <!-- ========== Data Source Configuration =============================== -->
   <!--
     <data-sources>
  -    <data-source
  -       autoCommit="false"
  -      description="Example Data Source Configuration"
  -      driverClass="org.postgresql.Driver"
  -         maxCount="4"
  -         minCount="2"
  -         password="mypassword"
  -              url="jdbc:postgresql://localhost/mydatabase"
  -             user="myusername"
  -    />
  +    <data-source>
  +      <set-property property="autoCommit"
  +                       value="false"/>
  +      <set-property property="description"
  +                       value="Example Data Source Configuration"/>
  +      <set-property property="driverClass"
  +                       value="org.postgresql.Driver"/>
  +      <set-property property="maxCount"
  +                       value="4"/>
  +      <set-property property="minCount"
  +                       value="2"/>
  +      <set-property property="password"
  +                       value="mypassword"/>
  +      <set-property property="url"
  +                       value="jdbc:postgresql://localhost/mydatabase"/>
  +      <set-property property="user"
  +                       value="myusername"/>
  +    </data-source>
     </data-sources>
   -->
   
  
  
  

Reply via email to