Single tag for 5.5.x
Multiple for 5.0.x

Doug


----- Original Message ----- From: "J Malcolm" <[EMAIL PROTECTED]>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, March 04, 2005 10:57 AM
Subject: Single-Tag DataSource Definition?



I know the docs define a jdbc datasource using multiple nested tags, e.g.:

              <Resource name="jdbc/mail" auth="Container"
type="javax.sql.DataSource"/>

               <ResourceParams name="jdbc/mail">
                 <parameter>
                   <name>factory</name>

<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
                 </parameter>

                 <parameter>
                   <name>maxActive</name>
                   <value>100</value>
                 </parameter>     etc.......

But somewhere I saw an alternate single-tag format:

              <Resource name="jdbc/mail" auth="Container"
type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxActive="100"
maxIdle="30" maxWait="10000" username="?????" password="???????"
driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost:3306/jbf?autoReconnect=true"/>

I don't remember where that originated, but it was in a supposedly running
environment.  I'd much prefer to use the single tag format if possible.
Problem is that it doesn't seem to work. Error says the class and url are
null.

Was I simply incorrect in thinking it was a working env, and it this
actually simply invalid syntax.  Or is it supported, perhaps in a later
version of Tomcat?  Or do you code the Java differently with the other
syntax?

Can someone educate me on this?

Thanks.

Jerry


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to