Page 1 of 1

About Question enthuware.ocpjp.v7.2.1167 :

Posted: Thu Nov 13, 2014 12:34 pm
by tanzwud
Hello. Sorry I have try to find information in internet but is not much about autocommit mode.
Wrong answer: When a JDBC Connection is created, its commit mode depends on the parameters used while creating the connection.
Based on answer, is that true that there is no option using Properties to set auto-commit to false or to try set up this value in DB URL to make answer two correct.

Re: About Question enthuware.ocpjp.v7.2.1167 :

Posted: Fri Nov 14, 2014 1:24 am
by admin
As per https://docs.oracle.com/javase/7/docs/a ... ction.html :
By default a Connection object is in auto-commit mode, which means that it automatically commits changes after executing each statement.
HTH,
Paul.

Re: About Question enthuware.ocpjp.v7.2.1167 :

Posted: Fri Jan 29, 2016 2:33 am
by toolforger
Hmm... "by default" could mean "default before setting autocommit", or "default unless you set a property".
There might be JDBC drivers out there that interpreted the spec according to the latter.
Also, there are JDBC drivers that simply get it wrong.
Not sure what the Oracle exam wants us to answer to such a question. Or how precise the wording on the Oracle exam would be.

Re: About Question enthuware.ocpjp.v7.2.1167 :

Posted: Wed Nov 18, 2020 11:59 am
by olsongrant
Here's some evidence that there are some JDBC drivers that support the setting of a property for autocommit:

https://www.ibm.com/support/knowledgece ... onprop.htm

https://www.ibm.com/support/pages/error ... ommit-mode

Re: About Question enthuware.ocpjp.v7.2.1167 :

Posted: Wed Nov 18, 2020 11:43 pm
by admin
Thanks for the info. For the purpose of the exam, you should assume that a connection is in auto-commit mode if you haven't called setAutoCommit(false).