I need to know how ensures that container closes EMF (using wildfly 8.0 and hibernate-jpa).
Every time that I undeploy my app a instance of WeldJpaInjectionServices$EntityManagerResourceReferenceFactory stays on memory holding a EMF instance.
This is causing a OOM Exception after some deploys/undeploys.
I'm not using EMF references in my code, only a EntityManager with @Produces and @PersistenceContext annotation.
It is happening on wildfly 8.0, 8.1 and 9.0alpha, with java 7 and 8.
Leak is related with keep-alive and read-timeout properties of Undertow.
In new version of Wildfly (8.2) we can define these properties:
After setup no more leaks on deploy/undeploy.
ISSUE:WFLY-3536 - Wildfly 8.1.0 Final keeps established connections forever