Tomcat 4.0, MySQL and connection pools...


Darryl L. Pierce

I'm having a heck of a time getting connection pooling to work under Tomcat
4.0.6 with MySQL. I've done the following steps:

1. Copied the mysql.jar file into $TOMCAT_HOME/commons/lib, along with
commons-collections.jar, commons-dbcp.jar and commons-pool.jar

2. Placed the following default context into my server.xml file:

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

<ResourceParams name="jdbc/RapixDB">







3. Added the following to my web.xml file for my servlet:

<description>Proxy DB Connection</description>

4. And am using standard JNDI calls to create my initial context and then
attempt to grab a data source.

Things fall apart on step #4 above. I consistently get a NamingException
thrown when I call InitialContext.lookup("java:comp/env/jdbc/RapixDB").

Any help?


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question