Atomikos Forum |
|
Hi,
Would anyone know where we tell the Connection Pooler how to turn off auto-commit for SQLServer? Using Hibernate but Atomikos is managing. Getting this trace below. e.g. 2009-04-30 14:31:11,330 WARN (default.1) [atomikos] Error in commit on vendor connection java.sql.SQLException: commit() should not be called while in auto-commit mode. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.commit(ConnectionJDBC2.java:1878) at com.atomikos.jdbc.nonxa.AtomikosThreadLocalConnection.transactionTerminated(AtomikosThreadLocalConnection.java:355) I'm on the latest version (3.5.4) and am using jta/non-xa and Hibernate3.3.1 My code is simply doing this: private static UserTransactionImp sUserTx = new UserTransactionImp(); sUserTx.setTransactionTimeout(300); sUserTx.begin(); mLog.info( "begin processing message " + messageBody.getUUID() ); processor.processMessage(null, null, messageBody, mContext); sUserTx.commit(); In the transactions.properties file, possibly relevant entries are: com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory com.atomikos.icatch.automatic_resource_registration=true In the Hibernate.cfg.xml name="connection.provider_class">com.atomikos.icatch.jta.hibernate3.AtomikosConnectionProvider</property> <property name="connection.atomikos.nonxa">true</property> <property name="connection.atomikos.uniqueResourceName">re_nonxa</property> <property name="connection.atomikos.driverClassName">net.sourceforge.jtds.jdbc.Driver</property> |