We're updating the issue view to help you get more done. 

ThreadLocal in ContextHolder causes memory leak when deployed in a web container

Description

The SearchFactory has a static ThreadLocal variables which holds a reference to the SearchFactoryImpl. The _ThreadLocal_is not cleared when the application is undeployed, causing a memory leak. See

Environment

Hibernate 3.4.0.GA/3.5.1-Final, Tomcat 6.0.26, Spring 2.5.6/3.0.1, Sun JDK 1.6; Hibernate 3.3.1.GA Tomcat 6.0.18 Spring 2.5.6 Java OpenJDK 1.6

Status

Assignee

Unassigned

Reporter

Vojtěch Krása

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Affects versions

3.0.0.GA
3.2.0.Beta1
3.1.1.GA
3.2.0.CR1
3.0.1.GA
3.1.0.CR1
3.1.0.GA
3.1.0.Beta1
3.1.0.Beta2

Priority

Critical