When you create a hibernate EntityManager you should also close its instance when the EntityManager is no longer used. This must be done as else every EntityManager will hold and keep a connection from the connection pool and this can lead to a leak.
To prevent a connection leak the ivy core will now close closes all open EntityManager instances on HttpRequestEnd. And if If a not correctly closed instance is found. We found, we log the warning you mentioned.
To avoid the warning you should correctly close open EntityManager instances. Best practice is to handle EntityManager.close() in a finally block:
private static List querySomething(){
IIvyEntityManager ivyEntityManager = Ivy.persistence().get("myPersistencUnitName");
EntityManager em = ivyEntityManager.createEntityManager();
try{
em.getTransaction().begin();
List results = em.createQuery("SELECT XXX").getResultList();
em.getTransaction().commit();
return results;
} finally {
em.close();
}
}