Behavior when hibernate.connection.autocommit set to false


#1

Hello Vlad,

What will be the behavior when following configuration is done in hibernate.cfg.xml file:

	<property name="hibernate.connection.autocommit">false</property>

In this case, how does hibernate handle the updates/inserts which are done outside a transaction?


#2

The User Guide explains all configuration properties.

In this case, how does hibernate handle the updates/inserts which are done outside a transaction?

An exception will be thrown if you try to flush any change outside of a JPA/Hibernate transaction. Only queries are permitted outside of a JPA/Hibernate transaction.