About Question enthuware.ocpjp.v7.2.1195 :

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

Moderator: admin

Post Reply
Biplav002
Posts: 1
Joined: Sat Nov 25, 2017 2:25 pm
Contact:

About Question enthuware.ocpjp.v7.2.1195 :

Post by Biplav002 »

c.setAutoCommit(false) is set to false and we are neither setting it to true nor using c.commit(),will commit happen?

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

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

Post by admin »

No, it will not be committed but the last comment in the given code says, "// continue with existing transaction", so you don't really have to worry about whether the transaction will be committed or not after that line.

jme_chg
Posts: 29
Joined: Sun Feb 07, 2021 6:30 pm
Contact:

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

Post by jme_chg »

Just to confirm, if there was no if statement at all and you had:

c.rollback(sp1); //*
c.rollback();

at the end, then line * would be redundant as the second line would just undo all?

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

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

Post by admin »

Yes, that is correct.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests