tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjorn Danielsson <>
Subject Re: JDBC connection pool memory leak
Date Fri, 04 Jan 2013 19:08:58 GMT
Hi Romain,

I have a tiny tarball with sources and build.xml available here:

Look in README.txt for further instructions. I made the example
as small as I could, it's very tiny, but there are a few steps
to go through since a database needs to be created etc.

I stumbled upon another thing while isolating this: it turns
out that having a ValidationQuery is important. I use the query
SELECT * FROM MYTABLE. When I remove this, the memory leak goes

I also tested two more databases, Postgresql and Microsoft Azure
SQL. Like Derby before, neither of them showed any increase in
memory. So something strange is happening when the Mysql driver
and the Tomcat-JDBC pool are interacting via JPA.

Bjorn Danielsson
Cuspy Code AB

Romain Manni-Bucau <> wrote:
> ok so can you share a sample reproducing the issue please?
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog:
> LinkedIn:
> Github:
> 2013/1/4 Bjorn Danielsson <>:
>> Romain Manni-Bucau <> wrote:
>>> just to be sure to understand:
>>> in a plain tomcat does StatementFinalizer replace stmt.close() to make
>>> the leak going away?
>> Yes.
>> --
>> Bjorn Danielsson
>> Cuspy Code AB

View raw message