Mark Struberg reopened DELTASPIKE-848:

I agree that this might be a problem. We at least have to tell the users in our 
documentation that they need to close the EMF themselves.

I remember that I initially DID have the emf.close in the code. But I ran into 
heavy problems with shutting down in EAR cases. 
I don't remember the exact details anymore but I think parts of the application 
were already destroyed and then the emf.close() did blow up badly (even the 
isOpen() if I remember correctly).
Maybe we can play with it a bit in a few samples...

> EntityManagerFactory is not closed on disposal
> ----------------------------------------------
>                 Key: DELTASPIKE-848
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-848
>             Project: DeltaSpike
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: Sven Linstaedt
> {{org.apache.deltaspike.jpa.impl.entitymanager.EntityManagerFactoryProducer}} 
> does produces EntityManagerFactory, but it does not implement a disposal 
> method, which closes the factory on destruction, causing any underlying 
> SesionFactories to leak.

This message was sent by Atlassian JIRA

Reply via email to