While playing with a custom ConnectionProvider implementation, I came across this code in Ejb3Configuration:
Code:
if ( ! "true".equalsIgnoreCase( cfg.getProperty( Environment.AUTOCOMMIT ) ) ) {
log.warn( "{} = false break the EJB3 specification", Environment.AUTOCOMMIT );
}
Could anyone clarify the EJB3 requirement that needs this configuration? Since AUTOCOMMIT is a Hibernate property not a JPA property, I'm guessing it needs to be set in order to make some aspect of Hibernate behave in a JPA-compliant way, so I just want to understand what that aspect is. In other words, what functionality uses this property and will be non-compliant if it's set to false?
This ticket seems to be relevant, but it doesn't explain the reason for needing AUTOCOMMIT:
https://hibernate.onjira.com/browse/EJB-49. Looking at the EJB3 spec, the only reference to "autocommit" I could find is in section 13.3.4. Also, this Hibernate wiki page seems to discourage setting autocommit to true:
https://community.jboss.org/wiki/Non-tr ... commitModeThanks in advance!
Nikita