Page 1 of 1

About Question enthuware.ocpjp.v7.2.1195 :

Posted: Sat Jan 13, 2018 10:22 am
by Biplav002
c.setAutoCommit(false) is set to false and we are neither setting it to true nor using c.commit(),will commit happen?

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

Posted: Sat Jan 13, 2018 12:47 pm
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.

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

Posted: Sun Mar 28, 2021 9:27 am
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?

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

Posted: Sun Mar 28, 2021 9:50 am
by admin
Yes, that is correct.