On 04/25/2016 12:04 AM, Vlad Mihalcea wrote:
1. "calling EntityManager#close on a closed EntityManager should
result in an
exception;" - that's a reasonable default and shouldn't cause too much
trouble.
2. "Another change in expectation is in regards to operations outside of a
transaction" - in JPA we can execute queries outside a transaction, but any
write will fail if there is no transactional context, which is reasonable
for me too. If Hibernate allows writes outside of a transactional context,
that's definitely a thing we should not support anyway.
3. "Asking a Session if is contains (Session/EntityManager#contains) a
non-entity" - we can handle this with the separate exception handler
strategies to retain both JPA and Hibernate behaviors.
4. "Accessing Session/EntityManager#getTransaction. JPA says that is
only allowed
for JDBC transactions. Hibernate always allows it." - I'd choose the
Hibernate behavior because I don;t see how it can cause any issue and it's
an enhancement as well.
+1