We're updating the issue view to help you get more done. 

EntityManager.close() should throw an ISE if called on already closed EntityManager

Description

Calling EntityManager.close() on an already closed entity manager, should throw an IllegalStateException. From JPA2.2 spec:

1 2 3 4 5 6 7 8 9 10 11 /** * Close the factory, releasing any resources that it holds. * After a factory instance has been closed, all methods invoked * on it will throw the IllegalStateException, except for isOpen, * which will return false. Once an EntityManagerFactory has * been closed, all its entity managers are considered to be * in the closed state. * @throws IllegalStateException if the entity manager factory * has been closed */ public void close();

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Scott Marlow

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major