tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David.Meldrum" <david.meld...@verizon.net>
Subject Re: Extra Threads in background
Date Mon, 04 May 2009 18:41:31 GMT
This may be the key to duplicate Thread.  I am not really confident in 
my server.xml so here it is.  Note that I have two "hosts" one for 
"localhost" and the other for the domain "southchurch.atx.cx"  Is that 
correct?  Could that cause the application to run twice?

Server.xml----
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.core.AprLifecycleListener" 
SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener 
className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
      <!-- ******* Added by D.M. for South Church   -->
      <Host name="southchurch.ath.cx"  appBase="webapps"
          unpackWARs="true" autoDeploy="true"
          xmlValidation="false" xmlNamespaceAware="false">
         
          <!--  Access Log Valve turned off
          <Valve className="org.apache.catalina.valves.AccessLogValve"
               directory="logs" prefix="b4bc_access_log."
               suffix=".txt" pattern="common" resolveHosts="false"/>
               -->
      </Host>
      <Host name="localhost"  appBase="webapps"
          unpackWARs="true" autoDeploy="true"
          xmlValidation="false" xmlNamespaceAware="false">
            </Host>
    </Engine>
  </Service>
</Server>
--  end server.xml

I am more confident in the context.xml

Begin context.xml ----
<?xml version="1.0" encoding="UTF-8"?>
<!-- <Context path="/b4bc" docBase="b4bc"
     debug="5" reloadable="true" crossContext="true"> -->
<Context debug="5" reloadable="true" crossContext="true">
   <Resource name="jdbc/b4bcDB" auth="Container"
       type="javax.sql.DataSource"
    maxActive="10" maxIdle="5" maxWait="10000"
    username="b4bc"
    password="cantTellYou"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/b4bc?autoReconnect=true"
    logAbandoned="true"
    removeAbandoned="true"
    removeAbandonedTimeout="60"
    validationQuery="SELECT 1 "  />
    <!--  JDBC Realm definition -->
    <Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99"
    dataSourceName="jdbc/b4bcDB" localDataSource="true"
    userTable="users" userNameCol="lname" userCredCol="password"
    userRoleTable="roles" roleNameCol="role" />
</Context>
---  End context.xml
>
> As far as your having two instances of your extra thread running, your 
> webapp
> might be getting deployed twice. Poorly constructed server.xml and 
> context.xml
> configs can easily cause this.
>
> - Chuck
>

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


Mime
View raw message