In my XML, I am creating the below beans with 'defaultAutoCommit' set to false.
However, I am getting errors "java.sql.SQLException: Can't call commit when autocommit=true". It is like the 'defaultAutoCommit' is being ignored. If set to "true", the error goes away.
I do have declarative transaction around my save method.
<bean id="dataSource"
class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="targetDataSource">
<ref bean="dataSourceTarget" />
</property>
<property name="defaultAutoCommit">
<value>false</value>
</property>
<property name="defaultTransactionIsolationName">
<value>TRANSACTION_READ_COMMITTED</value>
</property>
</bean>
<bean id="dataSourceTarget"class="org.springframework.jdbc.datasource.DriverManagerDataSource">
..etc
</bean>