title: JBoss database connection pool auto-commit behavior
body: <p>We are using JBoss 4 and Oracle with a JNDI datasource configured via JBoss datasource XML file.</p>
  
  <p>Recently realized that all connections acquired from the datasource by default has the auto-commit property set to true. However, we rely on Oracle stored procedures and want to control the commits within the stored procedures.</p>
  
  <p>We use plain JDBC calls as well as Spring StoredProcedure wrapper to call stored procedures from JBoss. Trying to set the auto-commit from JBoss datasource XML did not really work.</p>
  
  <p>I can only see that for each connection we get from datasource we can set the auto-commit property to false, but does someone know how we could configure this in one place?</p>
  
  <p>Edit: I am adding the datasource configuration we use:</p>
  
  <pre><code>&lt;local-tx-datasource&gt;
      &lt;jndi-name&gt;some name&lt;/jndi-name&gt;
      &lt;connection-url&gt;jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(port=1521)(host=xxx))(address=(protocol=tcp)(port=1521)(host=xxx)))(load_balance = yes)(connect_data=(SERVICE_NAME=xxx)(SERVER=DEDICATED)))&lt;/connection-url&gt;
      &lt;driver-class&gt;oracle.jdbc.driver.OracleDriver&lt;/driver-class&gt;
      &lt;user-name&gt;xxxr&lt;/user-name&gt;
      &lt;password&gt;xxx&lt;/password&gt;
      &lt;!-- Checks the Oracle error codes and messages for fatal errors --&gt;
      &lt;exception-sorter-class-name&gt;
          org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
      &lt;/exception-sorter-class-name&gt;
      &lt;min-pool-size&gt;5&lt;/min-pool-size&gt;
      &lt;max-pool-size&gt;25&lt;/max-pool-size&gt;
      &lt;!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml --&gt;
      &lt;metadata&gt;
          &lt;type-mapping&gt;Oracle10g&lt;/type-mapping&gt;
      &lt;/metadata&gt;
  &lt;/local-tx-datasource&gt;
  </code></pre>
  
  <p>We also used , but no change...</p>