Kartik Pandya

Greenhorn
+ Follow
since Apr 06, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kartik Pandya

Hi,
I am currently using database oracle 11g and jdk 1.6.0_17.

In my java code, first I have set the auto commit to false so that I can rollback it later if any exception occurs.
After that there are few SQL procedures which i call.(There is no commit statement inside these procedures)
After that if there is an exception then i just do conn.rollback() and in the finally block i have closed the connection.

However the rollback is happening partially only.
If the exception is thrown halfway then all the changes in the database are rollbacked.
But if exception occurs near the end of the code execution then the same changes (which were rollbacked earlier when exception was thrown halfway) are not rollbacked completely. Only few changes are rolbacked.

I am quite positive that there is no explicit commit or any DDL statement in the code.

Please help me with this issue!!!


2 years ago