On 22/09/2014 13:50, Christopher Schultz wrote:
> Mark,
> 
> On 9/17/14 4:06 PM, Christopher Schultz wrote:
>> Mark,
> 
>> On 9/17/14 4:02 PM, Mark Thomas wrote:
>>> On 17/09/2014 20:55, Christopher Schultz wrote:
>>>> All,
>>>>
>>>> I'm running Tomcat 8.0.9 on Mac OS X under Oracle's Java 7 
>>>> jdk1.7.0_65.
>>>>
>>>> For a long time, I've had a cleanly reloading web application, 
>>>> meaning that after my web application is reloaded (say, during 
>>>> development), the old WebappClassLoader is available for GC.
>>>>
>>>> After switching to Tomcat 8.x in my development environment, 
>>>> I've noticed that I can't cleanly reload anymore. Using
>>>> YourKit, I've traced the reference to my WebappClassLoader to
>>>> DBCP2.
>>>>
>>>> I have a JNDI DataSource whose JDBC driver is loaded from 
>>>> Tomcat's CATALINA_HOME/lib directory.
> 
>>> Where is the connection pool defined? In the Context or
>>> globally?
> 
>> <Resource> is defined in my webapp's context.xml.
> 
> Bump.

I hadn't forgotten this.

Looking into this has certainly been a good refresher for JDBC driver
related memory leaks.

For the benefit of the archives:
- make sure you are using the latest mysql driver
- you'll need to add "com.mysql.jdbc.NonRegisteringDriver" to the
JreMemoryLeakPreventionListener's classesToInitialize set

Also, right now, you'll need to add closeMethod="close" to the
<Resource.../> definition for the DataSource. This shouldn't be
necessary and I am in the process of fixing this for the next 8.0.x release.

Mark

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

Reply via email to