tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kito Holliday <holli...@phys.psu.edu>
Subject Re: jdbc driver
Date Wed, 21 Sep 2005 13:17:52 GMT
Thanks

Specifically, I have a web.xml having:

**************
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
  <resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/TestDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref>
<!-- end tomcat addition -->
***************

and a server.xml having

*****************Sorry for the long server.xml**********

<Server port="8005" shutdown="SHUTDOWN" debug="0">
 <Service name="Tomcat-Standalone">
   <Connector className="org.apache.catalina.connector.http.HttpConnector"
              port="8080" minProcessors="5" maxProcessors="75"
              enableLookups="true" redirectPort="8443" acceptCount="10"
              debug="0" connectionTimeout="60000" />
   <Engine name="Standalone" defaultHost="localhost" debug="0">
   <Logger className="org.apache.catalina.logger.FileLogger"
           prefix="standaloneEngine_log." suffix=".txt"
           timestamp="true"/>
   <Realm className="org.apache.catalina.realm.MemoryRealm" />
   <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
     <Valve className="org.apache.catalina.valves.AccessLogValve"
            directory="logs" prefix="localhost_access_log." suffix=".txt"
            pattern="common" />
     <Logger className="org.apache.catalina.logger.FileLogger"
             directory="logs" prefix="standaloneHost_log." suffix=".txt"
             timestamp="true" />
       <Context path="" docBase="ROOT" debug="0" />
       <Context path="/manager" docBase="manager" debug="0"
                privileged="true">
         <Logger className="org.apache.catalina.logger.FileLogger"
                 prefix="standalone_manager_log." suffix=".txt"
                 timestamp="true" />
       </Context>
       <Context path="/examples" docBase="examples" debug="0"
                reloadable="true" crossContext="true">
         <Logger className="org.apache.catalina.logger.FileLogger"
                 prefix="standalone_examples_log." suffix=".txt"
                 timestamp="true" />
         <Environment name="maxExemptions" type="java.lang.Integer"
                      value="15" />
         <Parameter name="context.param.name" value="context.param.value"
                    override="false" />
         <Resource name="mail/Session" auth="Container"
                   type="javax.mail.Session" />
         <ResourceParams name="mail/Session">
           <parameter><name>mail.smtp.host</name>
                      <value>localhost</value>
           </parameter>
         </ResourceParams>
       </Context>
       <Context path="/DBTest" docBase="DBTest" debug="5"
reloadable="true"
                crossContext="true">
         <Logger className="org.apache.catalina.logger.FileLogger"
                 prefix="standalone_DBTest_log." suffix=".txt"
                 timestamp="true" />
         <Resource name="jdbc/TestDB" auth="Container"
                   type="javax.sql.DataSource"
                   driverClassName="com.mysql.jdbc.Driver" />
           <ResourceParams name="jdbc/TestDB">
             <parameter>
               <name>factory</name>

<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
             </parameter>
             <parameter>
               <name>factory</name>
               <value>com.mysql.jdbc.jdbc2.optional.
                      MysqlConnectionPoolDataSource</value>
             </parameter>
             <parameter>
               <name>maxActive</name>
               <value>100</value>
             </parameter>
             <parameter>
               <name>maxIdle</name>
               <value>30</value>
             </parameter>
             <parameter>
               <name>maxWait</name>
               <value>10000</value>
             </parameter>
             <parameter>
               <name>username</name>
               <value>javauser</value>
             </parameter>
             <parameter>
               <name>password</name>
               <value>javadude</value>
             </parameter>
             <parameter>
               <name>driverClassName</name>
               <value>com.mysql.jdbc.Driver</value>
             </parameter>
             <parameter>
               <name>url</name>
               <value>jdbc:mysql://localhost:3306
                      /javatest?autoReconnect=true</value>
             </parameter>
               <parameter>
               <name>removeAbandoned</name>
               <value>true</value>
             </parameter>
             <parameter>
               <name>removeAbandonedTimeout</name>
               <value>60</value>
             </parameter>
             <parameter>
               <name>logAbandoned</name>
               <value>true</value>
             </parameter>
           </ResourceParams>
       </Context>
     </Host>
   </Engine>
 </Service>
 <Service name="Tomcat-Apache">
    <Logger className="org.apache.catalina.logger.FileLogger"
            prefix="tomcat_apache_service." suffix=".txt"
            timestamp="true"/>
    <Connector
className="org.apache.catalina.connector.warp.WarpConnector"
               port="8008" minProcessors="5" maxProcessors="75"
               enableLookups="true" appBase="webapps" acceptCount="10"
               debug="0" />
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
            name="Apache" localHost="127.0.0.1" debug="5">
      <Logger className="org.apache.catalina.logger.FileLogger"
           prefix="tomcatapacheEngine." suffix=".txt" timestamp="true"/>
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
      <Host name="localhost1" debug="0" appBase="webapps"
            unpackWARs="true">
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs" prefix="tomcatapacheHost_log."
                 suffix=".txt" timestamp="true" />
        <Context path="" docBase="ROOT" debug="0" />
        <Context path="/DBTest" docBase="DBTest" override="true" debug="5"
                 reloadable="true" crossContext="true" useNaming="false">
          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="tomcatapache_DBTest_log." suffix=".txt"
                  timestamp="true" />
          <Resource name="jdbc/TestDB" auth="Container"
                    type="javax.sql.DataSource"
                    driverClassName="com.mysql.jdbc.Driver"
                    username="javauser" password="javadude"
                    url="jdbc:mysql://localhost:3306
                        /javatest?autoReconnect=true"
                    factory="org.apache.commons.dbcp.
                            BasicDataSourceFactory"
                    maxActive="100"
                    maxIdle="30"
                    validationQuery="SELECT 1"
                    testOnBorrow="true"
                    testWhileIdle="true"
                    timeBetweenEvictionRunsMillis="10000"
                    minEvictableIdletime="60000"
                    maxWait="10000"
                    removeAbandoned="true"
                    removeAbandonedTimeout="60"
                    logAbandoned="true" />
        </Context>
-       <Context path="/manager" docBase="manager" debug="0"
                 privileged="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="apachetomcat_manager_log." suffix=".txt"
                  timestamp="true" />
        </Context>
        <Context path="/examples" docBase="examples" debug="0"
                 reloadable="true" crossContext="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                  prefix="apachetomcat_examples_log." suffix=".txt"
                  timestamp="true" />
          <Environment name="maxExemptions" type="java.lang.Integer"
                       value="15" />
          <Parameter name="context.param.name" value="context.param.value"
                     override="false" />
          <Resource name="mail/Session" auth="Container"
                    type="javax.mail.Session" />
            <ResourceParams name="mail/Session">
              <parameter>
                <name>mail.smtp.host</name>
                <value>localhost</value>
              </parameter>
            </ResourceParams>
          </Context>
        </Host>
      </Engine>
   </Service>
 </Server>


On Tue, 20 Sep 2005, andy gordon wrote:


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