google / google/guice

guice-servlet+guice-persist -- Memory leak

Open
#768 1 comment 0 reactions 0 assignees View on GitHub
Component-Persist imported
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

_From [m.zabel.92](https://code.google.com/u/113275355068145543288/) on August 28, 2013 07:58:42_

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: http://code.google.com/p/google-guice/issues/detail?id=768_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.