tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Problem in Resource declaration
Date Wed, 29 Jun 2005 12:44:25 GMT
Without more info, my guess is that it doesn't work.

Maybe you could tell us *how* it doesn't work. Do you get an error?
Does smoke pour out of your server? Do the lights dim?

Throw us a bone here.

Larry


On 6/28/05, Behrang Saeedzadeh <behrangsa@gmail.com> wrote:
> Hi
> 
> I want to define a DBCP pooled MySQL connection for a test application.
> The following definition is not working:
> 
>         <?xml version="1.0" encoding="UTF-8"?>
>         <Context path="/Hibernate-02">
>                 <Resource name="jdbc/Hibernate02" scope="Shareable"
> type="javax.sql.DataSource" auth="Container"/>
>                         <ResourceParams name="jdbc/Hibernate02">
>                                 <parameter>
>                                         <name>factory</name>
> 
>                 <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>                         </parameter>
> 
>                         <!-- DBCP database connection settings -->
>                         <parameter>
>                         <name>url</name>
>                         <value>jdbc:mysql:///Hibernate02?user=root&amp;password=bsaku2633&amp;autoReconnect=true</value>
>                         </parameter>
>                         <parameter>
>                         <name>driverClassName</name>
>                         <value>com.mysql.jdbc.Driver</value>
>                         </parameter>
> 
>                         <!-- DBCP connection pooling options -->
>                         <parameter>
>                                 <name>maxWait</name>
>                                 <value>3000</value>
>                         </parameter>
>                         <parameter>
>                                 <name>maxIdle</name>
>                                 <value>100</value>
>                         </parameter>
>                         <parameter>
>                                 <name>maxActive</name>
>                                 <value>10</value>
>                         </parameter>
>                 </ResourceParams>
>         </Context>
> 
> But the following definition works:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Context path="/Hibernate-02">
>         <Resource name="jdbc/Hibernate02" auth="Container"
> type="javax.sql.DataSource"
>          maxActive="100" maxIdle="30" maxWait="10000"
>          username="root" password="bsaku2633"
> driverClassName="com.mysql.jdbc.Driver"
>          url="jdbc:mysql:///Hibernate02?autoReconnect=true"/>
>         </Resource>
> </Context>
> 
> Any ideas what's wrong with the first declaration?
> 
> --
> Behrang Saeedzadeh
> http://www.jroller.com/page/behrangsa
> 
> Using Opera's revolutionary e-mail client
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message