A few things to consider:
1. Either place your Resource definition in server.xml as a
GlobalResource *OR* in your webapp's context.xml file.
2. If you have the Resource defined in the GlobalResources, that's the
only time you need to use a ResourceLink element in context.xml.
3. Drop the autoReconnect parameter in your mysql URL. It has it's
uses, but not in a pooled environment.
4. You should probably be attempting to use the path
java:comp/env/jdbc/TestMySQL (note the lack of a '/' before comp) as
described in the JNDI howto on tomcat's website. I think I saw you
using java:/comp/env/jdbc/TestMySQL in one of your posts.
5. Please post relevant messages from your logs if this isn't working.
--David
Mohammed Zabin wrote:
> Would you please be more specific? which file you mean? I have created
> Oracel connection Pool as the stated way above, and it's worked fine,
> shall
> i put resource defeninitoin in context.xml only?
>
> On 7/22/07, Pid <p@(protected):
>
>>
>> You only need one resource definition.
>> You only need a resource link definition if your resource is a global
>> one.
>>
>> Simplify your configuration and then post the error message from the
>> logs so we can see Tomcat says is wrong.
>>
>> p
>>
>>
>> Mohammed Zabin wrote:
>> > Hi All
>> >
>> > I have confiured oracle connection pool on my tomacat 6, and it worked
>> > fine.
>> > When i came to configure MySql, I repeated the same steps for Oracle
>> > databse, with considering the specfication of MySql database. But it's
>> > didn't work. Any Help please about configuring MySql,
>> > I downloaded MySql connector from mysql website and place it in
>> > CATALINA_HOME/lib directory, and i put the following:
>> >
>> > 1. in server.xml file:
>> > <Resource name="jdbc/TestMySql" auth="Container"
>> > type="
javax.sql.DataSource"
>> > maxActive="100" maxIdle="30" maxWait="10000"
>> > username="*" password="*" driverClassName="
>> >
com.mysql.jdbc.Driver"
>> >
>> > url="jdbc:mysql://localhost:3306/exam?autoReconnect=true"/>
>> >
>> > 2. in web.xml file
>> > <resource-ref>
>> > <description>Oracle Datasource example</description>
>> > <res-ref-name>jdbc/TestMySql</res-ref-name>
>> > <res-type>
javax.sql.DataSource</res-type>
>> > <res-auth>Container</res-auth>
>> > </resource-ref>
>> >
>> > 3. in context.xml file (on server's context.xml file):
>> > <Resource name="jdbc/TestMySql" auth="Container"
>> > type="
javax.sql.DataSource"
>> > maxActive="100" maxIdle="30" maxWait="10000"
>> > username="*" password="*" driverClassName="
>> >
com.mysql.jdbc.Driver"
>> > url="jdbc:mysql://localhost:3306/exam"/>
>> >
>> > 4. in cotext.xml file ( In my web application's context.xml file):
>> > <ResourceLink global="jdbc/TestMySql" name="jdbc/TestMySql" type="
>> >
javax.sql.DataSource"/>
>> >
>> > Any Help please?
>> >
>>
>>
>>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)