-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JPA EntityManager and AUTOCOMMIT
PostPosted: Fri Mar 02, 2012 1:51 am 
Newbie

Joined: Tue Apr 18, 2006 11:33 am
Posts: 1
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 ... commitMode

Thanks in advance!
Nikita


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.