Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Connection pool in Tomcat 4.1.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection pool in Tomcat 4.1.3" Watch "Connection pool in Tomcat 4.1.3" New topic
Author

Connection pool in Tomcat 4.1.3

lekha phijo
Greenhorn

Joined: Oct 09, 2003
Posts: 29
I have specified the configuration for jdbc in the server.xml
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/mydb">
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>driverName</name>
<value>jdbc:mysql//localhost/authority</value>
</parameter>
<parameter>
<name>user</name>
<value>Lekha</value>
</parameter>
<parameter>
<name>password</name>
<value>abc</value>
</parameter>
<parameter>
<name>pool</name>
<value>ON</value>
</parameter>
<parameter>
<name>loop</name>
<value>ON</value>
</parameter>
</ResourceParams>



In my code when I look up for the datasource using JNDI I get the foll error
cannot create PoolableConnectionFactory cause,
A user Id and password are required to establish a JDBC connection
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Connection pool in Tomcat 4.1.3