Hi,
Tomcat 5.5.x, 6.0.13 !
Resource name=jdbc/Name auth=Container type=javax.sql.DataSource
factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory username=XXX
password=XXX driverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://domain.com:3306/BASE?autoReconnect=true maxActive=10
maxIdle=10 maxWait=5000 removeAbandoned=true removeAbandonedTimeout=30
logAbandoned=true /
Tomcat 4.x, 5.x
Resource name=jdbc/Name auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/Name
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namemaxWait/name
value5000/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value30/value
/parameter
parameter
nameusername/name
valueXX/value
/parameter
parameter
namepassword/name
valueXXX/value
/parameter
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
parameter
nameurl/name
valuejdbc:mysql://domain1:3306/BASE?autoReconnect=true/value
/parameter
/ResourceParams
/Context
See you!
-Original Message-
From: daniel steel [mailto:[EMAIL PROTECTED]
Sent: sexta-feira, 29 de junho de 2007 14:55
To: Tomcat Users List
Subject: Re: Update Tomcat 5 - 6 .. JDBC driver problem
if we configure the url / db access as JNDI resource in the context files,
then the implementation has changed betwen tomcat 5 and tomcat6. not sure
about tomcat 5.5..
in tomcat6, it is
Context ...
...
Resource name=jdbc/EmployeeDB auth=Container
type=javax.sql.DataSource username=dbusername
password=dbpassword
driverClassName=org.hsql.jdbcDriver
url=jdbc:HypersonicSQL:database
maxActive=8 maxIdle=4/
...
/Context
in tomcat 5,
Context ...
...
Resource name=jdbc/EmployeeDB auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/EmployeeDB
parameter
nameusername/name
valuedbusername/value
/parameter
parameter
namepassword/name
valuedbpassword/value
/parameter
parameter
namedriverClassName/name
valueorg.hsql.jdbcDriver/value
/parameter
parameter
nameurl/name
valuejdbc:HypersonicSQL:database/value
/parameter
parameter
namemaxActive/name
value8/value
/parameter
parameter
namemaxIdle/name
value4/value
/parameter
/ResourceParams
...
/Context
thanks
dan
David Smith [EMAIL PROTECTED] wrote: That's good info, but only barely
related to the question at hand and they said they had it working in tomcat
5.5.23 -- just failing in tomcat 6. Given it works in one version of tomcat
and not another, I highly doubt the mysql jdbc url is at fault. The OP needs
to post portions of their configuration (context.xml, web.xml, server.xml)
before any further diagnosis can be done.
--David
Martin Gainty wrote:
MySQL Connector/J doc says
The JDBC URL format for MySQL Connector/J is as follows, with items
in square brackets ([, ]) being optional:
jdbc:mysql://[host][,failoverhost...][:port]/[database] »
[?propertyName1][=propertyValue1][propertyName2][=propertyValue2]...
If the hostname is not specified, it defaults to 127.0.0.1.
If the port is not specified, it defaults to 3306, the default port
number for MySQL servers.
jdbc:mysql://[host:port],[host:port].../[database] »
[?propertyName1][=propertyValue1][propertyName2][=propertyValue2]...
If the database is not specified, the connection will be made with
no default database.
M--
This email message and any files transmitted with it