Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Sat Dec 07, 2013 3:03 pm
by PMiglani
Hi, I have a doubt...

Will Runtime Exception cause the database Rollback or not in this case. i.e. if we change the Seq of updates in Option 1 and 2 will that work? Please explain.

Re: About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Mon Dec 09, 2013 12:47 am
by admin
A runtime exception (assuming that it is not marked as ApplicationException), will cause a transaction to be marked for rollback.

Re: About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Sat May 23, 2015 10:20 pm
by himaiMinh
Since the question does not mention the RuntimeException is an application exception or system exception, I would eliminate the first three options.

The last two options specify that there will be a system exception thrown if the database update fails.
That leads me to choose the last two options.

Re: About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Thu Jun 01, 2017 1:11 pm
by johnlong
If the Active Directory update fails..
This mean that Active Directory could (theoretically) be in inconsistent state (partially updated) ?
If yes, is this indeed good solution?

Re: About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Thu Jun 01, 2017 10:24 pm
by admin
No, why do you think so? The update may also fail because the server is down, data violates some business rule, security, or any such reason. That doesn't mean the data is inconsistent.

Re: About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Fri Jun 02, 2017 9:55 am
by johnlong
I am not saying it be definitely be the case, but there is a possibility.
For example, AD server went down during update.

Re: About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Fri Jun 02, 2017 10:07 am
by admin
Yes, there is always a possibility of inconsistent data no matter what you do. You can only minimize it but cannot eliminate it. Even two phase commit is not 100% correct. Such data is fixed manually based on business rules. So I am not sure what is your point.

Re: About Question enthuware.oce-ejbd.v6.2.620 :

Posted: Fri Jun 02, 2017 10:11 pm
by johnlong
Thank you for your reply. Everything is clear.