Commit is happening when selecting data with Hibernate

Solution Verified - Updated -

Issue

In MySql database it is possible to have a log that is written for every action so you can see SQL's and commit and rollback actions.

https://dev.mysql.com/doc/refman/5.5/en/query-log.html

When this log is enabled, it can be observed that for every select query run in hibernate from EJB, there is a commit after this select.
Is it possible to prevent sending a commit from Hibernate/EAP to the database?

Environment

  • Red Hat JBoss EAP
    • 7.x
  • Hibernate

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.