public boolean isOpen (); public void close ();
EntityManager is no longer
needed, you should call its
EntityManager releases any resources
it is using. The persistence context ends, and the entities managed by
EntityManager become detached.
Query instances the
created become invalid.
Calling any method other than
isOpen on a
EntityManager results in an
IllegalStateException. You cannot close an
EntityManager that is in the middle of a
If you are in a managed environment using injected entity managers, you should not close them.