You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by St...@p2, st...@phase2online.com on 2003/04/02 16:58:26 UTC

RE: Multiple datasources - is this working at all ?

By : "David D Christian" <Da...@usa.dupont.com>
----------------------------------------------------------------

I never saw an answer to this and struggled with it myself.  But, I
found the solution if anyone is interested.
The struts dtd actually provides the key.  (no pun intended)

The "key" is to put "key" as an attribute of the datasource element
rather than as a set-property element of the datasource element.

      An example is:
       <data-sources>
          <data-source key="MY_DATA_SOURCE_KEY">
              <set-property property="autoCommit"  value="false" />
              <set-property property="description" value="my development database" />
              <set-property property="driverClass" value="oracle.jdbc.driver.OracleDriver" />
              <set-property property="maxCount"    value="4" />
              <set-property property="minCount"    value="2" />
              <set-property property="user"        value="user" />
              <set-property property="password"    value="pass" />
              <set-property property="url"         value="jdbc:oracle:thin:@localhost:sid" />
          </data-source>
       </data-sources>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org