8 messages in com.mysql.lists.javaRe: mysqldatasourcefactory| From | Sent On | Attachments |
|---|---|---|
| joe pribele | 23 Sep 2002 12:14 | |
| Mark Matthews | 23 Sep 2002 12:40 | |
| joe pribele | 23 Sep 2002 13:30 | |
| Mark Matthews | 23 Sep 2002 13:37 | |
| joe pribele | 23 Sep 2002 13:46 | |
| Mark Matthews | 23 Sep 2002 14:13 | |
| Mark Matthews | 23 Sep 2002 15:06 | |
| joe pribele | 23 Sep 2002 15:26 |
| Subject: | Re: mysqldatasourcefactory![]() |
|---|---|
| From: | Mark Matthews (ma...@thematthews.org) |
| Date: | 09/23/2002 01:37:06 PM |
| List: | com.mysql.lists.java |
----- Original Message ----- From: "joe pribele" <jpri...@sympatico.ca> To: <ja...@lists.mysql.com> Sent: Monday, September 23, 2002 3:30 PM Subject: RE: mysqldatasourcefactory
I am trying to get the mysqldatasourcefactory to work with Tomcat. is there any documentation around somewhere ?
You don't use that class. The documentation that comes with the driver (README) tells you that you need to use MysqlDataSource (which uses MysqlDataSourceFactory). Nowhere does it say that you need to use MysqlDataSourceFactory, and the reason is that you shouldn't use it.
Tomcat-4.0 documentation covers _exactly_ how to setup datasources, see
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html
-Mark
thanks I think I am on the right track now. this is my server.xml but its complain that it can't create an instance of com.mysql.jdbc.jdbc2.optional.MysqlDataSource
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/TestDB"> <parameter> <name>factory</name> <value>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</value> </parameter>
<parameter> <name>user</name> <value>admin</value> </parameter>
<parameter> <name>password</name> <value>monkey</value> </parameter>
<parameter> <name>databaseName</name> <value>onlineladder</value> </parameter> </ResourceParams>
Which version of Tomcat are you using? It's usually easier to use what they spell out in the docs, using driverClassName and driverName, not using all of the datasource stuff.
-Mark




