Reputation: 554
I would like to know what is the autocommit mode by default in JPA EntityManager with EclipseLink, is it autocommit-true or false? If by default it is false, when it is set to true, during the commit/rollback? ie., during entitymanager.getTranaction.commit() / entitymanager.getTranaction.rollback()?
And finally how to find out the autocommit mode programatically in JPA Eclipselink? Thnaks!
Upvotes: 2
Views: 1693
Reputation: 21145
If you referring to auto commit on the JDBC connection, EclipseLink sets it to false when starting a transaction and true after commit/rollback, unless a JTA transaction controller is used. Checking the auto commit setting requires getting the JDBC connection from JPA, see http://wiki.eclipse.org/EclipseLink/FAQ/JPA#How_to_access_the_JDBC_connection.3F
Upvotes: 1