title: How can I config to turn off autocommit in Spring + JDBC?
body: <p>I am using Spring with JDBC and found that it is autocommit.</p>
  
  <p>How can I config to turn it off in spring-servlet.xml?</p>
  
  <p>This is my current configuration:</p>
  
  <pre><code>&lt;bean id="dataSource"
      class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
      p:driverClassName="${jdbc.driverClassName}"
      p:url="${jdbc.databaseurl}" p:username="${jdbc.username}"
      p:password="${jdbc.password}" /&gt;
  
  &lt;bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
    &lt;property name="dataSource" ref="dataSource"/&gt;
  &lt;/bean&gt;
  </code></pre>