Open cursors are not released

Hello everyone
Injection of entitymanager using @ Persistencecontext in spring ,for saving, extraction of data cursor is open in database even after returning from @Transactional method in-service class from where I am calling methods in dao layer like em.merge() calling em.close() after each database operations in a finally block open cursors are not released in database.Due to which I am facing maximum open cursors exceeded exception.

Try to replicate it with this Hibernate test case to isolate the problem.

If you can replicate it, you should open a Jira issue. If you cannot replicate it, it’s not a Hibernate issue, being a usability issue.