more: [1] Research Hibernate not releasing connections

* went through all manager classes and moved EM calls
* added a bit to JPA helper
* added shutdown listener to close EM factory