this is my closeEntityManager() method:
Entity manager and transaction should be nested, the transaction within the entity manager.
This transaction is not hibernate transaction. This is JTA transaction and we are using it with EJB 2.0.
My jpa work is done inside session ejb method, so entity manager has to be nested in JTA transaction.