xiaodududu / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

guice-servlet+guice-persist -- Memory leak #768

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When a simple guice servlet application is created, e.g. following the example 
in the wiki (https://code.google.com/p/google-guice/wiki/ServletModule), it can 
be deployed and redeployed several times without problems. 

With the usage of guice-persist a memory leak occurs. This happens as soon as 
the following two lines are added to the configuration class:

install(new JpaPersistModule("name")); 
filter("/*").through(PersistFilter.class);

On a running application server (tested with Tomcat) multiple redeploys result 
in a PermGen exception.

As a profiler reveals, several instances of Guice's own classes cannot be 
garbage collected after undeployment.

This was tested with guice version 4.0-beta and 3.0.

Original issue reported on code.google.com by m.zabel...@gmail.com on 28 Aug 2013 at 11:58

GoogleCodeExporter commented 9 years ago

Original comment by sberlin on 20 Dec 2013 at 2:15