Exactly, you are closing the EntityManager in the finally block and then the
container fails when it attempts to close it at transaction completion. The
whole idea of a container-managed persistence context is that you don't have
to manage it, so don't ;)
Sahoo wrote:
>
> Why do you have this line of code:
>
> em = DatabaseUtil.getEntityManager();
>
>
> when you have the injected entity manager at your disposal? Use the
> injected EM and let us know.
>
--
View this message in context: http://www.nabble.com/org.hibernate.SessionException%3ASession-is-closed%21-tp20682799p20686187.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.