title: Glassfish : "Non Transactional Settings" option in JDBC Pools
body: <p>In Glassfish, there is a JDBC Pool option called </p>
  
  <blockquote>
    <p>Non Transactional Connections</p>
  </blockquote>
  
  <p>So am I correct in thinking that "Non Transactional Connections" is the same as setting auto-commit=false ?</p>
  
  <p>If that is correct, then why, when this option is <em>disabled</em> (i.e. non-transactional enabled) do I get an error saying </p>
  
  <blockquote>
    <p>org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled.</p>
  </blockquote>
  
  <p>This is when I have java code that looks like :</p>
  
  <pre><code>try {
  preparedStatement = connection.prepareStatement(.....);
  preparedStatement.executeQuery();
  connection.commit();
  }
  </code></pre>