tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik <>
Subject Re: Tomcat JNDI Datasource
Date Fri, 07 Feb 2014 03:45:51 GMT
Yes, define the connection pool in server.xml, <GlobalNamingResources> then
in context.xml define a <ContextLink> That binds the shared connection pool
to each context.

On Thursday, February 6, 2014, David Newman <> wrote:

> I have defined a JNDI JDBC datasource as a resource in the global
> context.xml file.  I was under the impression that what this does is to
> create a shared connection pool that is tomcat wide.  But in practice what
> seems to happen is that a new instance of that connection pool is created
> for each context that is running in the container.  For example, if I have
> 6 web applications deployed I end up with 60 connections to my database,
> assuming the default initialSize parameter of 10.
> Is there a way to have a single connection pool that is shared amongst
> deployed applications?
> In case it is relevant this is tomcat 7.0.19 using the tomcat connection
> pool.
> Thanks
> -Dave

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message