tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shilpa Nalgonda" <>
Subject configre datasource in server.xml
Date Mon, 09 Aug 2004 19:28:23 GMT
I have configured for datasouce on Tomcat 4.1.03 in
/TOMCAT_HOME/conf/server.xml file.
My application runs fine on my windows desktop.
Now i am in the process of migrating that applicATION ON lINUX MACHINE.  On
Unix, we have apache installed as connector, which routes requests to Tomcat
server.  so whenever we restart tomcat we also restart apache.
Now my question is can i put the datasource configuration under
or should i create a new server.xml with just the datasource configuration
under WEB_INF folder.
Below is the configuration which i want to add in server.xml

    <!-- JNDI datasource setup to connect to MYSQL database-->
     	<Context path="/prototype" docBase="prototype"
        	debug="5" reloadable="true" crossContext="true" useNaming="true">

  	<Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_PrototypeDBTest_log." suffix=".txt"
       <Resource name="jdbc/prototypedb"

  	<ResourceParams name="jdbc/prototypedb">

    	<!-- 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.

    	<!-- Maximum number of idle dB connections to retain in pool.
         Set to 0 for no limit.

   	 <!-- 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.

    	<!-- MySQL dB username and password for dB connections  -->

    	<!-- Class name for mm.mysql JDBC driver -->

    	<!-- 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
         connection.  mysqld by default closes idle connections after 8


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

View raw message