title: Difference between EclipseLink and Hibernate for long running sessions (Vaadin 7 and JPAContainer)
body: <p>Although I need this answer to better understand how I can integrate Vaadin 7 and the JPAContainer addon in Wildfly 8.1, this is a general question that applies to Hibernate and Eclipse-link JPA implementations.</p>
  
  <p>JPACaontainer Vaadin Addon recommends to have an EntityManager for the whole servlet-session, this IMO is not good design because AFAIK (and please correct me) to scale it will always be better to use stateless EntityManager-Per-Request pattern</p>
  
  <p>JPAContaner Addon states that:</p>
  
  <ol>
  <li>Hibernate can not keep entity managers for long without problems.</li>
  <li>One issue with Hibernate is that it is designed for short-lived sessions, but the lifetime of an entity manager is normally roughly that of a user session (read, servlet session). The problem is that if an error occurs in a session or an entity manager, the manager becomes unuseable. This causes big problems with long-lived sessions that would work fine with EclipseLink.</li>
  </ol>
  
  <p>What is the difference between Hibernate and EclipseLink, at the implementation level that makes those two statements be true? OR, are those two statements sill valid in the first place?</p>