tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke (Terry) Vanderfluit" <l...@chipcity.com.au>
Subject database connection pool in server.xml <--> conf/Catalina/localhost/app.xml
Date Wed, 08 Sep 2004 22:36:31 GMT
Hi,
I've tried to put the database connection details in a separate file in
CATALINA_HOME/conf/Catalina/localhost/. That didn't work however, so
I've had to revert back to putting that same stuff in the
conf/server.xml file to get it working again

this is the app specific code that I have in server.xml (and it works),
the same code that I put in an app.xml file in the
CATALINA_HOME/conf/Catalina/localhost/ directory (and it doesn't work),

what do I need to add or change?
~~~~~~~~~~~~~~~~
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- ~~~~~~ MEGABOARD APPLICATION ADDED 1 September 2004 ~~~~~~~ -->
<!-- ~~~~~~~~~~~~~~~~~~~~~ megaboard application ~~~~~~~~~~~~~~~ -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
            <Context path="/megaboard" docBase="megaboard"
               debug="0" reloadable="true">
               <Valve
className="org.apache.catalina.valves.AccessLogValve"
                  directory="webapps/megaboard/logs"
prefix="mbAccessLog."
                  suffix=".log" pattern="common" resolveHosts="false"/>
               <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="mblog." suffix=".txt" timestamp="true"/>
               <Resource name="jdbc/mb" auth="Container"
type="javax.sql.DataSource"/>
               <ResourceParams name="jdbc/mb">
                  <parameter>
                     <name>factory</name>
                    
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
                  </parameter>
      <!-- Maximum number of dB connections in pool.
            Set to 0 for no limit.  -->
                  <parameter>
                     <name>maxActive</name>
                     <value>100</value>
                  </parameter>
      <!-- Maximum number of idle dB connections to retain in pool.
            Set to 0 for no limit.  -->
                  <parameter>
                     <name>maxIdle</name>
                     <value>30</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>
                  <parameter>
                     <name>removeAbandoned</name>
                     <value>true</value>
                  </parameter>
                  <parameter>
                     <name>username</name>
                     <value>luke</value>
                  </parameter>
                  <parameter>
                     <name>password</name>
                     <value></value>
                  </parameter>
                  <parameter>
                     <name>driverClassName</name>
                     <value>org.postgresql.Driver</value>
                  </parameter>
                  <parameter>
                     <name>url</name>
                     <value>jdbc:postgresql:megaboard</value>
                  </parameter>
               </ResourceParams>
            </Context>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- ~~~~~~~~~~~~~~~~ END MEGABOARD APPLICATION ~~~~~~~~~~~~~~~~ -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
~~~~~~~~~~~~~~~~~~~

-- 
========================
Luke (Terry) Vanderfluit 
Mobile: 0421 276 282     
========================


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message