tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject RE: jndi + dbcp [SOLUTION]
Date Tue, 18 Nov 2003 05:36:34 GMT
My problem with the DBCP is that the tomcat manager will not install the
database connection for a pooled datasource.  Each time I add a new
Context or Host, I must stop and restart the entire tomcat app.  This is
not fun and takes more than 5 minutes.  

To install a new app in the manager I use


Each time I do this it starts the web context but without the database
connection.  Any suggestions? Or is there a way to gracefully restart
the tomcat in a multiple virtual domain environment.


I put the resource link into the context as was mentioned..but still no

<Context path="/" docBase="" debug="0"
reloadable="true" crossContext="false">

<Logger className="org.apache.catalina.logger.FileLogger"
	prefix="localhost_log." suffix=".txt"
	timestamp="true" />

<Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="webapps/"  prefix="access_log."
                 pattern="combined" resolveHosts="false"/>

          <ResourceLink name="jdbc/myconn"

<Resource name="jdbc/myconn" auth="CONTAINER"
type="javax.sql.DataSource" />
<ResourceParams name="jdbc/myconn">
	<!--set 0 for no limit of max connections-->
	<!--set 0 for no limit idle connections-->
	<!--max time to wait for connection...and then exception is
thrown (-1 to set indefinitely)-->



	<!--autoconnect = true means that mm.mysql will automatically
connect if mysql closes the connection.-->
	<!--mysqld automatically closes idle connections after 8
	<Environment name="maxExemptions" type="java.lang.Integer"
          <Parameter name=""
          <Resource name="mail/Session" auth="Container"
          <ResourceParams name="mail/Session">

-----Original Message-----
From: Christopher Schultz [] 
Sent: Monday, November 17, 2003 7:38 PM
To: Tomcat Users List
Subject: Re: jndi + dbcp [SOLUTION]


> Marc Thanks..!
> Do you know if the global link is necessary...or what it does?

Apparently, GlobalNamingResources is a misnomer. What it really means is

"global pool of available resources". If you want to make one available 
to a Context, you'll need a <ResourceLink> element.

Note that you'll also need a <resource-ref> in your deployment 
descriptor, too!


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message