craigmcc 01/06/02 11:20:48
Modified: conf/share struts-config_1_0.dtd
src/share/org/apache/struts/util package.html
web/example/WEB-INF struts-config.xml
Log:
Port DTD updates for data sources to the HEAD branch.
Revision Changes Path
1.5 +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.5
diff -u -r1.4 -r1.5
--- struts-config_1_0.dtd 2001/05/20 01:46:00 1.4
+++ struts-config_1_0.dtd 2001/06/02 18:20:47 1.5
@@ -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.5 2001/06/02 18:20:47 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 <set-property> 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
1.7 +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.7
diff -u -r1.6 -r1.7
--- package.html 2001/03/31 22:22:23 1.6
+++ package.html 2001/06/02 18:20:47 1.7
@@ -434,12 +434,24 @@
Simply include a section that looks like this:</p>
<pre>
<data-sources>
- <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"
- />
+ <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>
</pre>
1.11 +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.11
diff -u -r1.10 -r1.11
--- struts-config.xml 2001/04/11 02:08:20 1.10
+++ struts-config.xml 2001/06/02 18:20:48 1.11
@@ -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>
-->