As mentioned in bugzilla #6060, *part* of the reason multiple data-sources
doesn't work is DataSourceConfig.addProperty() adds the KEY to the
properties, when it should just assign it's member.  Here's a diff on the
version in CVS for Feb 27th of what I mean:
 
Index: src/share/org/apache/struts/config/DataSourceConfig.java
===================================================================
RCS file:
/home/cvspublic/jakarta-struts/src/share/org/apache/struts/config/DataSource
Config.java,v
retrieving revision 1.4
diff -u -r1.4 DataSourceConfig.java
--- src/share/org/apache/struts/config/DataSourceConfig.java 23 Feb 2002
23:53:29 -0000 1.4
+++ src/share/org/apache/struts/config/DataSourceConfig.java 27 Feb 2002
19:18:39 -0000
@@ -157,10 +157,14 @@
      */
     public void addProperty(String name, String value) {
 
-        if (configured) {
-            throw new IllegalStateException("Configuration is frozen");
-        }
-        properties.put(name, value);
+    if ( name.equals("key") ) {
+     setKey(value) ;
+    } else {
+         if (configured) {
+             throw new IllegalStateException("Configuration is frozen");
+         }
+         properties.put(name, value);
+    }
 
     }
 

 
 

Reply via email to