About Question enthuware.ocpjp.v7.2.1167 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
tanzwud
Posts: 19
Joined: Mon Sep 01, 2014 9:45 pm
Contact:

About Question enthuware.ocpjp.v7.2.1167 :

Post 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.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

toolforger
Posts: 38
Joined: Fri Nov 13, 2015 4:40 am
Contact:

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

Post 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.

olsongrant
Posts: 8
Joined: Mon Nov 02, 2020 10:21 pm
Contact:

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

Post 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

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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).

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests