tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: DBCP Pool not context-specific?
Date Wed, 01 Nov 2006 18:19:07 GMT

John Gorkos wrote:
> On Wednesday 01 November 2006 11:58, Christopher Schultz wrote:
>> 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:
> <Context crossContext="true" debug="10" docBase="AMDSTools"

It looks like you have your resource defined (correctly) in context.xml,
which is what I would expect do to for context isolation of such a

I wonder if "crossContext=true" muddles this at all? My understanding is
that crossContext="true" basically changes the cookie path from "/myapp"
to "/", and allows a globally-managed session instead of per-context
sessions. I'm grasping at straws, here, since your config at least looks

>     <Resource name="jdbc/psql" auth="Container"

Any chance that your JNDI names are colliding with other apps? I dunno
if Tomcat provides JNDI isolation for contexts (although it wouldn't
make any sense not to provide that).

If none of these turns out to be the problem, you may have to re-post
your question. Often, folks on the list assume that a continued
conversation means that the problem is getting solved by someone else,
and might not read it. If you don't get a reply for a day or so, re-post
with some of the extra information you've provided to me.

I'm not an expert when it comes to the subtleties of Tomcat and context
isolation. Who knows... maybe you even found a bug.


View raw message