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