So the background would be that we use slightly different metadata/Entities. Sometimes there are a few extra entities in the database, so we cant use just one SessionFactory? Anyway I have solved our resource consumption ‘good enough’, so I would be fine if we just state that the prefered way to handle Hibernate is to use a sessionfactory per classloader or some leaks may occur. There are more severe issues to take care of.. |