Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigurationHelper leaks memory when SessionFactory is closed. #26

Closed
kidnme opened this issue Sep 22, 2014 · 2 comments
Closed

ConfigurationHelper leaks memory when SessionFactory is closed. #26

kidnme opened this issue Sep 22, 2014 · 2 comments

Comments

@kidnme
Copy link

kidnme commented Sep 22, 2014

When the session factory is closed, the integrator calls the ConfigurationHelper configureDefaultProperties() with a null set of properties. This causes the session factory to be removed from the DEFAULT_PROPERTIES hash, but not from the JDBC 42 hash. Repeated invocations of the Configuration Helper (as in unit tests that recreate the database and the session factory) will continue to add new session factories to the JDBC 42 hash - thus running large unit test suites out of memory.

@YolandaMDavis
Copy link

Experienced the same problem running with version 3.2.0 GA. In the context of Spring Batch we refer to several databases all whose session factory gets hashed in the ConfigurationHelper. After multiple executions of the batch process we experienced OutOfMemoryExceptions due to exceeding heap space. Using VisualVM we saw the same problem described by @kidnme where references to session factories were still in memory via the ConfigurationHelper JDBC42 hash. Our solution was to rollback to version 3.1.0 CR10 until this is resolved.

@chrisphe
Copy link
Member

Will be resolved shortly in HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants