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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content