AFAIK in an EJB context the EM is closed when a transaction is ended.
Unless you configure an extended persistence context. In that case the
EM stays open even when a transaction is commited and will be closed
upon removal of the EJB that holds it.

Oliver

2007/11/5, Marc Siegel <[EMAIL PROTECTED]>:
> Hi Folks,
>
> Is it necessary to close the EntityManager and open a new one to avoid
> memory leaks / excessive usage? What is the best practice for
> EntityManager lifecycle?
>
> -Marc
>

Reply via email to