-
1. Re: JBoss autocommit problem
peterj Sep 18, 2008 12:34 PM (in response to sherst)I assume that you have read the documentation for the Oracle JDBC driver on how to turn autocommit off. What does it say?
-
2. JBoss autocommit problem
vykalra Feb 3, 2011 6:13 AM (in response to peterj)All,
Sorry for reviving this old thread but I am getting exactly same issue
" java.sql.SQLException: You cannot rollback with autocommit set!"
I tried to <no-tx-datasource> instead of <local-tx-datasource> in the -ds.xml file , I am deploying this on jboss 4.3.0.GA. My application uses hibernate and in one of the HibernateSessionWrapperclass I have the following code
if (this.session.connection().getAutoCommit()) {
this.session.connection().setAutoCommit(false);
}
I tried commenting this too without success. Please help !!! m clueless here...
-
-
4. JBoss autocommit problem
vykalra Feb 4, 2011 12:38 AM (in response to iabughosh)I tried this w/o success , i get the same error :
-
5. JBoss autocommit problem
iabughosh Feb 4, 2011 5:45 AM (in response to vykalra)Dear Vashal,
make sure that you are using local-tx or xa datasource and try adding this property to your hibernate.cfg:
hibernate.transaction.factory_class=org.hibernate.transaction.JBossTransactionManagerLookup