Hi Christian,
Apologies for emailing the wrong list. I assumed this would be more a
dbcp-config problem. Is there an alternative list specifically for
dealing with Tomcat config?
Other than the web.xml and context.xml files, we have made no other
changes to the tomcat setup. I will attach a copy of the context.xml
file in the hope that someone might be able to see what is wrong.
If the web.xml and context.xml files appear fine, I really have no idea
where to turn. Unfortunately, the technical people in the hosting
company don't seem to know what's wrong either.
Martin
Christian Hufgard wrote:
Hi Martin,
I think first of all, you should change the mailing list. :) This is
more a tomcat-config than a dbcp problem.
The resource-ref in the web.xml seems ok for me. Did you have the
datasource globally defined on your development/testing system?
Restarting your context should be sufficent if you changed your
web.xml/context.xml.
Take a look at
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
there is a pretty helpful documentation how to set up datasource for
Tomcat 5.5.
Christian
Saturday, January 7, 2006, 1:31:53 PM, you wrote:
Hi Christian,
In our web.xml file, we have a resource description as follows:
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/pokerdb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Is this what we need to change? Will this require other changes in the
context.xml file aswell?
Incidentally, because we are being hosted on a shared Tomcat server,
will changes to our web.xml and context.xml files require a global
tomcat restart, or will it be enough just to restart our context? I
would expect the hosting company not to allow us to restart Tomcat for
more than 100 users every time we need to make a change?
Thanks,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="poker."
suffix=".log" timestamp="true"/>
<Resource name="jdbc/pokerdb" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/pokerdb">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you configure your
mysqld max_connections large enough to handle all of your db connections. Set
to 0 for no limit. -->
<parameter>
<name>maxActive</name>
<value>30</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool. Set to -1 for
no limit. See also the DBCP documentation on this and the
minEvictableIdleTimeMillis configuration parameter. -->
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available in ms, in
this example 10 seconds. An Exception is thrown if this timeout is exceeded.
Set to -1 to wait indefinitely. -->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>myuser</value>
</parameter>
<parameter>
<name>password</name>
<value>mypassword</value>
</parameter>
<!-- Class name for the official MySQL Connector/J driver -->
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<!-- Force DBCP to remove abandoned connections -->
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>60</value>
</parameter>
<!-- The JDBC connection url for connecting to your MySQL dB. The
autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver
will automatically reconnect if mysqld closed the connection. mysqld by
default closes idle connections after 8 hours. -->
<parameter>
<name>url</name>
<value>jdbc:mysql://217.114.172.221/pokerhou_pokerdb</value>
</parameter>
</ResourceParams>
</Context>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]