tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Gorkos <john.gor...@sensus.com>
Subject Re: DBCP Pool not context-specific?
Date Wed, 01 Nov 2006 18:07:43 GMT
On Wednesday 01 November 2006 11:58, Christopher Schultz wrote:
> John,
>
> John Gorkos wrote:
> > I use per-context JNDI handles to
> > the same Postgres database for multiple apps running inside tomcat.  Each
> > context.xml sets up connection limits, max idle, etc, slightly
>
> differently.
>
> You said "per-context JNDI handles", not per-context JNDI DataSources.
> Where are you defining your datasource? In context.xml, or in server.xml
> with additional, per-context configuration in context.xml?
>
> Can you show us the configuration for your JNDI DataSource, including
> the location in whatever file you use? For instance, if you use
> server.xml, /where/ you do put the <Resource> element?
>
> -chris

Chris - thanks for the quick response.  We've just moved to tomcat 5.5.  I'm 
using a per-app context XML that looks like this:
<?xml version='1.0' encoding='utf-8'?>
<Context crossContext="true" debug="10" docBase="AMDSTools"
    path="/AMDSTools" reloadable="true" antiJARLocking="true" 
antiResourceLocking="true">
    <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="localhost_log." suffix=".txt" timestamp="true"/>
    <Resource name="jdbc/psql" auth="Container"
            type="javax.sql.DataSource" username="amds" password="XxXxXx"
            factory="org.apache.commons.dbcp.BasicDataSourceFactory"
            driverClassName="org.postgresql.Driver" 
url="jdbc:postgresql://127.0.0.1:5432/amds"
            removeAbandoned="true" removeAbandonedTimeout="2" 
logAbandoned="true"
            maxActive="60" maxIdle="30" maxWait="5000" 
poolPreparedStatements="true"/>
</Context>


My server.xml is untouched from the default distribution of tomcat 5.5.

And yes, I think the term I was searching for was per-context datasources.

John Gorkos


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


Mime
View raw message