Possible Memory Leak on JavaTypeDescriptorRegistry

Description

When using hibernate with a Container Managed EntityManagerFactory
some classes are loaded outside application classloader.

Every time that a application starts hibernate register JavaTypeDescriptos on JavaTypeDescriptorRegistry.INSTANCE.

The problem is that anybody clean it on application stop, and it is a static instance inside hibernate module classloader.

Possible solution: work with a weak reference of class.

Environment

Wildfly 8.2.0.Final
Jdk 1.8.0_25
Hibernate 4.3.6 (wildfly)

Attachments

Assignee

Unassigned

Reporter

Dyorgio Nascimento

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure